SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Tabular Reports
Selecting Observations


The table that you created in the previous guided practice displayed statistics on all observations in the Admit data set. But suppose you want to create a table displaying statistics for women only.

If you completed the lesson Creating List Reports, you already learned to use the WHERE statement to select observations based on certain conditions.

     proc print data=clinic.admit;
        var age height weight fee;
        where age>30;
     run;

The WHERE statement works the same way with PROC TABULATE. For example, the table below summarizes only observations for women.

     proc tabulate data=clinic.admit;
        class sex;
        var height weight; 
        table sex,height*min weight*max;
        where sex='F';
     run;

  Height Weight
Min Max
Sex 61.00 172.00
F



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement