Example 8.3 Separating Completely Duplicate Observations from Unique Observations

Goal

Identify observations that are a complete copy of another observation. Write the unique observations to one data set and write the duplicate observations to another data set.

Example Features

Featured StepPROC SORT
Featured Step Options and StatementsDUPOUT=, NODUPRECS, and OUT= options
Related TechniqueDATA step, BY statement and LAG function

Input Data Set

Data set PMTEMPS records the hourly afternoon weather data for three locations. Note that the 17:00 Rooftop measurement is recorded identically three times. The 18:00 Rooftop, 16:00 Beach, and 16:00 Downtown measurements are recorded twice. The 14:00 and 15:00 Downtown measurements are identical except ...

Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.