Eliminating Duplicates by Using PROC SORT
Suppose you have a data set where each patient is supposed to be represented by a single observation. To demonstrate what happens when you have multiple observations with the same ID, some duplicates in the PATIENTS data set were included on purpose. Observations with duplicate ID numbers are shown next.
OBS PATNO GENDER VISIT HR SBP DBP DX AE 2 002 F 11/13/1998 84 120 78 X 0 3 002 F 11/13/1998 84 120 |
Get Cody’s Data Cleaning Techniques Using SAS® Software now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.