두 데이터 세트를 스태킹하는 다음 두 가지 대체 방법의 결과가 다른 이유는 무엇입니까?데이터 세트를 스태킹 할 때 예기치 않은 결과가 발생했습니다.
data work.a;
length ds $1;
ds = 'A';
do i = 1 to 3;
output;
end;
run;
data work.b;
length ds $1;
ds = 'B';
do i = 1 to 3;
do j = 1 to 3;
output;
end;
end;
run;
*- ALTERNATIVE 1 -*;
data work.c;
set work.a work.b;
if j = . then j = i;
run;
*- ALTERNATIVE 2 -*;
data work.d;
set work.a work.b;
run;
data work.d;
set work.d;
if j = . then j = i;
run;
제 생각에 데이터 세트 c와 d는 모두 j = i이고 ds = 'A'입니다.