Previous Page | Next Page

The TABULATE Procedure

Example 2: Specifying Class Variable Combinations to Appear in a Table


Procedure features:

PROC TABULATE Statement options:

CLASSDATA=

EXCLUSIVE

Data set: ENERGY
Formats: REGFMT., DIVFMT., and USETYPE.

This example


Program

 Note about code
data classes;
   input region division type;
   datalines;
1 1 1
1 1 2
4 4 1
4 4 2
;
 Note about code
options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
proc tabulate data=energy format=dollar12. 
              classdata=classes exclusive;
 
 Note about code
   class region division type;
 Note about code
   var expenditures;
 Note about code
   table region*division,
          type*expenditures
 Note about code
        / rts=25;
 Note about code
   format region regfmt. division divfmt. type usetype.;
 Note about code
   title 'Energy Expenditures for Each Region';
   title2 '(millions of dollars)';
run;

Output

                      Energy Expenditures for Each Region                      1
                             (millions of dollars)

              ---------------------------------------------------
              |                       |          Type           |
              |                       |-------------------------|
              |                       |Residential |  Business  |
              |                       | Customers  | Customers  |
              |                       |------------+------------|
              |                       |Expenditures|Expenditures|
              |                       |------------+------------|
              |                       |    Sum     |    Sum     |
              |-----------------------+------------+------------|
              |Region     |Division   |            |            |
              |-----------+-----------|            |            |
              |Northeast  |New England|      $7,477|      $5,129|
              |-----------+-----------+------------+------------|
              |West       |Pacific    |     $13,959|     $12,619|
              ---------------------------------------------------

Previous Page | Next Page | Top of Page