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

Order the Headings

Overview

So far we have relabeled headings, deleted headings, and changed the width of headings. But what if you have the right headings, but you do not like the order in which they appear? You can change the order of two variables by reversing their order in the TABLE statement. But if your headings represent the values of a class variable, you cannot list them specifically in the TABLE statement.
To control the order in which the values of a class variable appear in the row or column headings, you need to use the ORDER= option. This option is used in the PROC TABULATE statement. The four settings for this option, UNFORMATTED, FORMATTED, DATA, and FREQ, are shown in the following examples.

Using ORDER=FORMATTED

The default ...
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