BookmarkSubscribeRSS Feed

SAS dataset 의 문자형 변수를 숫자형으로 변경하는 방법(숫자형 변수를 문자형으로 변경하는 방법) - SAS 문자 숫자 변환

Started ‎08-10-2021 by
Modified ‎08-10-2021 by
Views 4,880

아래 샘플 코드를 참고하세요. ^^

 

*이미 생성된 데이터셋(work.a)을 변경하지 말고 새로운 데이터셋(work.a1)으로 생성하십시요.

 

(샘플 코드)

data a ;

   input num car$ @@;

   cards

   ;

   1 2 3 4 5 6 7 8 9 10

   ;

run;

 

proc contents data=a;

run;

 

data a1;

   set a;

   num_ro_car = put(num, $8.);

   car_to_num = input(car, 8.);

run;

 

proc contents data=a1;

run;

 

*** 참고로, 구글 검색에서 "SAS 문자 숫자 변환" 으로 검색하여 나오는 내용을 참고하셔도 좋습니다. 

 

Version history
Last update:
‎08-10-2021 02:03 AM
Updated by:
Contributors

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Article Tags