LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 3 Sep 2008 09:28:12 -0700
Reply-To:   Reeza <fkhurshed@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Reeza <fkhurshed@HOTMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: SAS 9.2: PROC MEANS with Character Variables
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=windows-1252

On Sep 3, 10:16 am, Uelsasser <UlrichElsas...@t-online.de> wrote: > Hi > > I think it works. > > For example : > proc means data=sashelp.class; > var sex; > run; > > ---> does not work; > LOG > proc means data=sashelp.class; > 29 var sex; > ERROR: Variable Sex in list does not match type prescribed for this > list. > 30 run; > > ...... but : > > data temp; > set sashelp.class; > keep sex; > run; > proc means data=temp; > run; > > ---> produces the following output > > The MEANS Procedure > > N > Obs > ------ > 19

But it appears if there is a numeric variable, the numeric variable trumps the character variable and ignores the character variable. So this solely works if you have only a character dataset, not a mixed one. And I didn't test for multiple character variables

data temp; set sashelp.class; keep sex age; run; proc means data=temp; run;

The MEANS Procedure

Analysis Variable : Age

N Mean Std Dev Minimum Maximum

ャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャ 19 13.3157895 1.4926722 11.0000000 16.0000000


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