再:論理演算の選択に関する質問isMissing(x)は、xが欠落している場合は1、xが欠落していない場合は0を返します。使用することもできます
isMissing(x)1または0と比較せずに;返される値は同じですが、読みやすい場合があります。
If( :Height > "60" & isMissing( :Weight ) , ... )
or
If( :Height > "60" & ! isMissing( :Weight ) , ... )
に注意してください!つまりじゃない 。
再:論理演算の選択に関する質問ありがとうございます論理演算選択に関する質問以下のスクリプトを使用すると、行4は「yes」に変わりませんが、他の行は変わります。もう一度確認しますか?私の目的は、:Height> "60"&(and)isMissing(:Weight)== 0の場合、両方が認識され、高さの値が「はい」に変更され、他の値は高さに変化がないことを認識することです。
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Set the value of JACLYN's weight to missing
// to allow for the test case, where the
// :Height is greater than 60, but the :Weight
// is missing
dt:Weight[4] = .;
// Since the column :height is numeric and a
// character value of "Yes" is to be placed in
// that column, the column needs to be changed
// to Data Type of Character
dt:Height << data type(character);
// Now a For Each Row() with a two level
// comparison can be used to change the
// described value
For Each Row(
If( :Height > "60" & isMissing( :Weight ) == 0,
:Height = "Yes"
)
);
