Creating a Summarized Data Set Using PROC SUMMARY
You can also create
a summarized output data set with PROC SUMMARY. When you use PROC
SUMMARY, you use the same code to produce the output data set that
you would use with PROC MEANS. The difference between the two procedures
is that PROC MEANS produces a report by default. By contrast, to produce
a report in PROC SUMMARY, you must include a PRINT option in the PROC
SUMMARY statement.
Example: Creating an Output Data Set
The following example
creates an output data set but does not create a report:
proc summary data=clinic.diabetes; var age height weight; class sex; output out=work.sum_gender mean=AvgAge AvgHeight AvgWeight; run;
If you placed a PRINT option in the PROC SUMMARY statement ...
Get SAS Certification Prep Guide, 4th 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.