I want to distinguish whether the cells in the column are empty using "is missing". In the JSL below, I hope to differentiate between the "name" and "Apple" fields, but the results are all 1. How should I modify it?
dtTest = Open( "$SAMPLE_DATA/Big Class.jmp" );
show(IsMissing(:age));
dtTest << New Column( "Apple", "Character", "Nominal" );
show(IsMissing(:Apple));
Check for 0 not for 1
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("Apple", "Character", "Nominal");
dt << New Column("Orange", Numeric, Continuous);
Show(Col Number(Column(dt, "age")) == 0);
Show(Col Number(Column(dt, "Apple")) == 0);
Show(Col Number(Column(dt, "Orange")) == 0);
Do you wish to check if all values are missing? You can for example use Col Number and check if it is 0
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("Apple", "Character", "Nominal");
dt << New Column("Orange", Numeric, Continuous);
Show(Col Number(Column(dt, "age")) == 1);
Show(Col Number(Column(dt, "Apple")) == 1);
Show(Col Number(Column(dt, "Orange")) == 1);
Check for 0 not for 1
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("Apple", "Character", "Nominal");
dt << New Column("Orange", Numeric, Continuous);
Show(Col Number(Column(dt, "age")) == 0);
Show(Col Number(Column(dt, "Apple")) == 0);
Show(Col Number(Column(dt, "Orange")) == 0);