LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (July 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 31 Jul 2008 22:35:27 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Subject:      Re: Proc Freq

On Thu, 31 Jul 2008 10:51:40 -0400, Anil Anand <anilkranand@GMAIL.COM> wrote:

>* I have the following Proc Freq with the Output shown below: > >proc* *freq* data=pop00; > >title1 "Neighborhood Population by Age"; > >title2 "Women of Childbearing Age"; > >where (*15*<=age<=*44* and sex=*2*); > >tables sex*tract*age/norow nopercent nocol nocum; > >format tract neigh. sex sexa. age chldbear.; >* run*; > >*Output:* >** >*Tract Age * >*Frequency 15-44 Total * >Allston 3600 3600 >North End 1200 1200 >South End 2640 2640 >Roxbury 3241 3241 > > >HOW can I remove the column for *Total* which is the last column in the >output. >Thanks so much for your help. > >Anil

Use PROC TABULATE instead of PROC FREQ;

options formchar="|----|+|---";

proc freq data=sashelp.class; tables age * sex / norow nopercent nocol nocum; run;

Age Sex

Frequency|F |M | Total ---------+--------+--------+ 11 | 1 | 1 | 2 ---------+--------+--------+ 12 | 2 | 3 | 5 ---------+--------+--------+ 13 | 2 | 1 | 3 ---------+--------+--------+ 14 | 2 | 2 | 4 ---------+--------+--------+ 15 | 2 | 2 | 4 ---------+--------+--------+ 16 | 0 | 1 | 1 ---------+--------+--------+ Total 9 10 19

proc tabulate data=sashelp.class; class age sex; table age , sex * n='' * f=4.; run;

---------------------------------- | | Sex | | |---------| | | F | M | |----------------------+----+----| |Age | | | |----------------------| | | |11 | 1| 1| |----------------------+----+----| |12 | 2| 3| |----------------------+----+----| |13 | 2| 1| |----------------------+----+----| |14 | 2| 2| |----------------------+----+----| |15 | 2| 2| |----------------------+----+----| |16 | .| 1| ----------------------------------

PS: Please tame your mail client so that it does not throw in all of those spurious asterisks.


Back to: Top of message | Previous page | Main SAS-L page