Features: |
PROC TABULATE statement options: FORMAT= TABLE statement: crossing (*) operator TABLE statement options: RTS= |
Other features: |
FORMAT statement |
Data set: | ENERGY |
data energy;
length State $2;
input Region Division state $ Type Expenditures;
datalines;
1 1 ME 1 708
1 1 ME 2 379
... more data lines ...
4 4 HI 1 273
4 4 HI 2 298
;
proc format; value regfmt 1='Northeast' 2='South' 3='Midwest' 4='West'; value divfmt 1='New England' 2='Middle Atlantic' 3='Mountain' 4='Pacific'; value usetype 1='Residential Customers' 2='Business Customers'; run;
proc tabulate data=energy format=dollar12.;
class region division type;
var expenditures;
table region*division, type*expenditures
/ rts=25;
format region regfmt. division divfmt. type usetype.;
title 'Energy Expenditures for Each Region'; title2 '(millions of dollars)'; run;
data energy;
length State $2;
input Region Division state $ Type Expenditures;
datalines;
1 1 ME 1 708
1 1 ME 2 379
... more data lines ...
4 4 HI 1 273
4 4 HI 2 298
;
proc format; value regfmt 1='Northeast' 2='South' 3='Midwest' 4='West'; value divfmt 1='New England' 2='Middle Atlantic' 3='Mountain' 4='Pacific'; value usetype 1='Residential Customers' 2='Business Customers'; run;