/***************************************************************************************************************** SAS file name: proc_tabulate.sas File location: __________________________________________________________________________________________________________________ Purpose: To provide a simple template for using Proc Tabulate in SAS Author: Peter Clemmensen Creation Date: 12/08/2020 This program supports the example page "A Simple Proc Tabulate Example in SAS" *****************************************************************************************************************/ /* One dimensional table */ proc tabulate data=sashelp.baseball; class Team; tables Team; quit; /* Two dimensional table */ proc tabulate data=sashelp.baseball; class Team; var nHome; tables Team, nHome; quit; /* Three dimensional table */ proc tabulate data=sashelp.baseball; class Team League; var nHome; tables League, Team, nHome; quit; /* Control Statistics */ proc tabulate data=sashelp.baseball; class Team; var nHome; tables Team, nHome*n; quit; /* Control Headers */ proc tabulate data=sashelp.baseball; class Team; var nHome; tables Team="", nHome="Home Runs"*n=""; quit;