Previous PageNext Page

Subsetting variables
There are two ways to subset variables.
For example, say you wanted to create a dataset with only the variables SUBJ, GENDER, and YEAR.

Data GenYear;
     Set library.Survey12;
     KEEP Gender Subj Year;
Proc Print;
     ID Subj;
     Title 'Like Example 1.3 in C&P Chapter 3';

Proc Print shows 5 observations and 3 variables.

Like Example 1.3 in C&P Chapter 3


  1       M        91
  7       F        90
  9       M        93
  5       F        92
  8       M        91

Previous PageTable Of ContentsNext Page