Skip to Main Content
PROC TABULATE by Example, Second Edition
book

PROC TABULATE by Example, Second Edition

by Lauren Haworth Lake, Julie McKnight
May 2015
Intermediate to advanced content levelIntermediate to advanced
348 pages
11h 31m
English
SAS Institute
Content preview from PROC TABULATE by Example, Second Edition

Turn a One-Dimensional Table into a Two-Dimensional Table

Add the Columns

The easiest way to build a two-dimensional table is to build it one dimension at a time. First, we will build the columns, and then we will add the rows.
For this first table, we will keep things simple. This is a table with two columns: one showing the number of observations for INCOME and another showing the mean of INCOME.
PROC TABULATE DATA=TEMP;
   VAR INCOME;
   TABLE INCOME*N INCOME*MEAN;
RUN;
Output 5.1 shows the results.
Output 5.1 One–Dimensional Table with Two Columns
dimensional table with Two Columns

Add the Rows

To turn this table into a two-dimensional table, we will add another variable ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS 9.4 Language Reference, 6th Edition

SAS 9.4 Language Reference, 6th Edition

SAS Institute

Publisher Resources

ISBN: 9781607649908