* 질문 : http://cafe.daum.net/statsas/B3m/14491
* 배열이나 프로그램 등으로도 작성이 가능하지만, PROC SUMMARY의 IDGROUP 옵션을 사용하면 다음과 같습니다.;
* OUT의 갯수가 유동적일때는 GROUP 별 최대 개수를 지정해야 합니다.;
* 참고1을 확인하시면 됩니다.;
DATA BACK;
INPUT ID $ TIME $ HAVIOR $;
CARDS;
1 0423 A
2 1200 B
3 0809 A
1 1927 C
3 0606 A
;
RUN;
PROC SUMMARY DATA=BACK NWAY MISSING;
CLASS ID;
OUTPUT OUT=BACK1(DROP=_:) IDGROUP(OBS OUT[2](TIME HAVIOR)=);
RUN;
* 참고1 : http://cafe.daum.net/statsas/3F8j/109;
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.