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

Create a Generic Macro to Produce Tables

If you regularly produce tables with a similar design, you can create a generic macro to simplify the table production process. This enables you to set up a basic format for titles, footnotes, row variables, and column variables and then to use it in all of your tables.
  1. Create the code. To produce this generic macro, you start by creating the basic PROC TABULATE code. This is the part of the code that does not vary between your tables. Just leave placeholders for the parts that will change from table to table, which will be filled in later by macro variables.
    PROC TABULATE DATA=TEMP;
       CLASS avar1 bvar2;
       VAR cvar3;
       TABLE var1,
          var2 *var3 *(dstat)*F=efmt
          / ROW=FLOAT BOX="ftext1";
    TITLE "gtext2"; RUN; ...
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