How to remove duplicated records\observations WITHOUT sorting in SAS?

前端 未结 8 1698
孤独总比滥情好
孤独总比滥情好 2021-02-08 14:21

I wonder if there is a way to unduplicate records WITHOUT sorting?Sometimes, I want to keep original order and just want to remove duplicated records.

I

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-08 14:58

    data output;
    set yourdata;
    by var notsorted;
    if first.var then output;
    run;
    

    This will not sort the data but will remove duplicates within each group.

提交回复
热议问题