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

前端 未结 8 1671
孤独总比滥情好
孤独总比滥情好 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:54

    I think the short answer is no, there isn't, at least not a way that wouldn't have a much bigger performance hit than a method based on sorting.

    There may be specific cases where this is possible (a dataset where all variables are indexed? A relatively small dataset that you could reasonably load into memory and work with there?) but this wouldn't help you with a general method.

    Something along the lines of Chris J's solution is probably the best way to get the outcome you're after, but that's not an answer to your actual question.

提交回复
热议问题