Example 2.1 Concatenating Data Sets
Goal
Concatenate three data sets. Define a variable that identifies the data set from which the observation originated.
Example Features
Featured Step | DATA step |
Featured Step Options and Statements | SET statement, IN= option |
Related Technique 1 | PROC SQL, OUTER UNION set operator and CORR keyword |
Related Technique 2 | PROC APPEND |
Input Data Sets
Data sets SPRINGGRADS, SUMMERGRADS, and FALLGRADS contain lists of biology students who graduated in spring, summer, and fall. The Student' final GPAs are included.
SPRINGGRADS Obs student concentration gpa 1 Johnson, Allison Biochemistry 3.86 2 Davis, Jeffrey General Biology 3.91 3 Hall, Daniel Genetics 3.43 4 Hill, Courtney Ecology 4.00 5 Scott, Tiffany Plant Biology 3.58 ...
Get Combining and Modifying SAS® Data Sets: Examples Second Edition 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.