다시 : 논리 연산 선택에 대한 질문isMissing (x)는 x가 없으면 1을, x가 없으면 0을 반환합니다. 당신은 또한 사용할 수 있습니다
1 또는 0과 비교하지 않고 isMissing (x); 반환 된 값은 동일하지만 읽기가 더 쉬울 수 있습니다.
If( :Height > "60" & isMissing( :Weight ) , ... )
or
If( :Height > "60" & ! isMissing( :Weight ) , ... )
주목하십시오! 그 의미는 아니 .
다시 : 논리 연산 선택에 대한 질문작동합니다 감사합니다논리 연산 선택에 대한 질문아래 스크립트를 사용하면 행 4가 "예"로 변경되지 않지만 다른 행은 변경됩니다. 다시 확인 하시겠습니까? 내 목적은 : 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"
)
);
