SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Computing Statistics for Numeric Variables
Selecting Statistics and Variables


Limiting Decimal Places

By default, PROC MEANS output uses the BEST. format. This can result in unnecessary decimal places, making your output hard to read. To limit decimal places, use the MAXDEC= option in the PROC MEANS statement and set it equal to the length you prefer.


General form, PROC MEANS statement with MAXDEC= option:
PROC MEANS <DATA=SAS-data-set>
<statistic-keyword(s)> MAXDEC=n;

where n specifies the maximum number of decimal places.


     proc means data=clinic.diabetes min max;
     run;

Variable Minimum Maximum
Age
Height
Weight
Pulse
FastGluc
PostGluc
15.0000000
61.0000000
102.0000000
65.0000000
152.0000000
206.0000000
63.0000000
75.0000000
240.0000000
100.0000000
568.0000000
625.0000000


     proc means data=clinic.diabetes min max maxdec=0;
     run;

Variable Minimum Maximum
Age
Height
Weight
Pulse
FastGluc
PostGluc
15
61
102
65
152
206
63
75
240
100
568
625



  back||next


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

Terms of Use & Legal Information | Privacy Statement