Previous PageNext Page

Using both forms of Subsetting - Okay now?
Create a data set with just the male's Height and Weight.

Data MHtWt;
     Set library.Survey12 (KEEP= Gender Subj Height Weight);
     IF Gender = 'M';
     DROP Gender;
Proc Print;
     ID Subj;
     Title 'Like Example 1.4 in C&P Chapter 3';
     Title2 'Males only';

Now the Print looks better.

Like Example 1.4 in C&P Chapter 3
Males only
SUBJ    HEIGHT    WEIGHT

  1        68       155
  9        66       120
  8       250        70

The logic of dropping GENDER is that since you built the data set with only males, there is not much point in having the variable in the data file. You know it has a constant value.

Previous PageTable Of ContentsNext Page