O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required