Date: Wed, 20 Dec 2006 17:04:02 -0500
Reply-To: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject: Re: Crosstab....Which proc??
Content-Type: text/plain; charset="US-ASCII"
> From: haleyjo
> I am trying to create a cross tab, and having trouble getting
> it to contain all of the info that I want.
This is one way:
%Let Var1 = Sex;
%Let Var2 = Name;
proc Freq data = SAShelp.Class
(where = (1));
tables &Var1. * &Var2.
/ list missing noprint
out = MyXtab;
proc Print data = MyXtab;
by &Var1. &Var2.;
id &Var1. &Var2.;
Ron Fehd the freq maven CDC Atlanta GA USA RJF2 at cdc dot gov
SUGI 24: 1999 Miami Beach FL
Posters 234 %FREQ1VAR
%FREQlVAR: Frequency of one variable with format:
a macro to standardize proc FREQ output data sets
http://www2.sas.com/proceedings/sugi24/Posters/p234-24.pdf
Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov