BookmarkSubscribeRSS Feed

[전치] 데이터 전치 후 구분자를 포함한 단일 변수 처리

Started ‎06-14-2020 by
Modified ‎06-14-2020 by
Views 83

* 질문 : http://cafe.daum.net/statsas/B3m/14966

 

data back;

 

input id $ text $;
cards;
001 abcd
001 anh
001 kij
002 kjih
002 juhi
003 kjih
003 hgbf
003 yh
003 jhyd
003 yhgf
;

data back1;
set back;
by id;
length new_var $50.;
retain new_var ;

if first.id then new_var='';
new_var= catx('/',new_var,text);
if last.id then output;
drop text;
run;



다음을 참조해 보시기를 바랍니다.
* 참고 http://cafe.daum.net/statsas/3F8j/117;
* 참조 : http://cafe.daum.net/statsas/3F8j/109;

* 참조 : http://cafe.daum.net/statsas/3F8j/253; 

Version history
Last update:
‎06-14-2020 10:21 PM
Updated by:
Contributors

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Article Labels
Article Tags