How to new a column fill information by compare other column valueHow to use script realize below function, thanks very much.
dt = Open( "$SAMPLE_DATA/BIG CLASS.JMP" );
If the value of height <=weight, then new a column name with"Status" fill "Yes" in column;
If the value of height > weight, then fill in "N" in column"Status" .
Re: How to new a column fill information by compare other column valueHere is one way to do it.
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "status", "Character", "Nominal" );
:status << Set Values(
{ "yes", "no" }[(:height << Get As Matrix) <= (:weight << Get As Matrix)]
);Re: How to new a column fill information by compare other column valueis there any requirements on height or weight?or as long as it is a number it should be work. I try it can realize successful, but when i try in my script and change column name, it do not work any more.
The only difference is one of the column is calculation result. I can't attach pic here i will reopen a discuss