cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
robot
Level VI

Is Missing( " " ) returns True?

I would like to differentiate a space cell and an empty cell.  The Is Missing() function interprets both as missing.  Is there a better way?

 

I am using JMP 16.2.0.

 

New Table( "Example",
	Add Rows( 1 ),
	New Column( "Empty", Character, "Nominal", Set Values( {""} ) ),
	New Column( "Empty Missing?",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Is Missing( :Empty ) )
	),
	New Column( "Space", Character, "Nominal", Set Values( {" "} ) ),
	New Column( "Space Missing?",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Is Missing( :Space ) )
	)
)
2 ACCEPTED SOLUTIONS

Accepted Solutions
vince_faller
Super User (Alumni)

Re: Is Missing( " " ) returns True?

A blank is just "" and it seems like JMP trims the inputs of spaces to just be blank again.  

 

Names default to here(1);
dt = New Table( "Example",
	New Column( "Fun", Character, Set Values( {" ", "", "A"} ) ),
	New Column("State", character,  Formula(
		Match(:Fun, 
			"", "Blank", 
			" ", "Space"
		, // else
			"Filled"
		)
	))
);

dt:Fun << Get Values(); // {"", "", "A"}

At least in 16.2

 

I know in earlier versions you couldn't even do ismissing() on non numbers.  

 

Vince Faller - Predictum

View solution in original post

txnelson
Super User

Re: Is Missing( " " ) returns True?

To add to @vince_faller , JMP does convert " " to "" in inputting into a data table, however, it does not conver " a" to "a".  That is, when valid characters do exist in the given cell, JMP maintains the leading spaces( "20" hex).  JMP also has escape strings to input blanks( \!b )( "08" hex ), and nulls( \!0 )( "" hex ).

Jim

View solution in original post

3 REPLIES 3
vince_faller
Super User (Alumni)

Re: Is Missing( " " ) returns True?

A blank is just "" and it seems like JMP trims the inputs of spaces to just be blank again.  

 

Names default to here(1);
dt = New Table( "Example",
	New Column( "Fun", Character, Set Values( {" ", "", "A"} ) ),
	New Column("State", character,  Formula(
		Match(:Fun, 
			"", "Blank", 
			" ", "Space"
		, // else
			"Filled"
		)
	))
);

dt:Fun << Get Values(); // {"", "", "A"}

At least in 16.2

 

I know in earlier versions you couldn't even do ismissing() on non numbers.  

 

Vince Faller - Predictum
txnelson
Super User

Re: Is Missing( " " ) returns True?

To add to @vince_faller , JMP does convert " " to "" in inputting into a data table, however, it does not conver " a" to "a".  That is, when valid characters do exist in the given cell, JMP maintains the leading spaces( "20" hex).  JMP also has escape strings to input blanks( \!b )( "08" hex ), and nulls( \!0 )( "" hex ).

Jim
robot
Level VI

Re: Is Missing( " " ) returns True?

Thanks @vince_faller and @txnelson .  This is not the answer I was hoping for, but it does explain the behavior.