Date: Fri, 25 Feb 2011 09:14:51 -0600
Reply-To: Charlie Huang <charlie.chao.huang@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Charlie Huang <charlie.chao.huang@GMAIL.COM>
Subject: By statement in Proc Report
Content-Type: text/plain; charset=ISO-8859-1
Hi,
In Proc Format, if I use by statement, I will have such results:
proc sort data=sashelp.class out=one;
by sex;
run;
proc report data=one nowd;
by sex;
columns age n;
define age/group;
run;
-- Sex=F -----------
Age n
11 1
12 2
13 2
14 2
15 2
-- Sex=M -----------
Age n
11 1
12 3
13 1
14 2
15 2
16 1
If I want to have a uniformized table format for both gender and my
desired result is like below, any way in Proc Report can do it? Many
thanks.
-- Sex=F -----------
Age n
11 1
12 2
13 2
14 2
15 2
16 0
-- Sex=M -----------
Age n
11 1
12 3
13 1
14 2
15 2
16 1