통계 clinical trial/SAS

PROC SORT를 이용한 중복자료 삭제

고향이안드로메다 2018. 11. 16. 10:26

참고1



PROC SORT DATA=zzz

DUPOUT= xxxx  NODUPKEY 

; BY Title 

; RUN ;


DUPOUT= option can be used to identify duplicate observations before actually removing them from a data set.


PROC SORT DATA=zzz  

DUPOUT=xxx  NODUPRECS 

; BY Title ;

; RUN ;


The DUPOUT= and NODUPRECS options are specified. The resulting output data set contains the duplicate observations for Brave Heart and Rocky because these rows have identical data for all columns.


PROC SORT DATA=zzz  

OUT=xxx  NODUPRECS  ;

; BY Title ;

RUN ;

 

OUT : 중복자료 삭제가 출력물.. 그런데 NODUPRECS하면 똑같은 자료가 있는 것만 삭제하고 출력하도록


PROC SORT DATA=zzz  

OUT=xxx  NODUPKEYS ; 

; BY Title ;

RUN ;


 NODUPKEYS (or NODUPKEY): 중복자료 제외하고 출력하기..