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 (May 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 7 May 2010 09:17:52 -0400
Reply-To:     Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:      Re: PROC MEANS printout without printing variable name?
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"

The other possibility is to get an output data set from PROC MEANS, then TRANSPOSE and PRINT it. This works nicely as long as only the 5 "classic" PROC MEANS statistics are desired (N MEAN STD MIN MAX).

Mike Rhoads

title ' proc means output without the variable name';

ods listing close; ods results off; ods pdf file="c:\junk\MeansNoName2.pdf";

data tempclass; set sashelp.class; label height = 'Height in inches' weight = 'Weight in pounds' ; run;

proc means noprint data=tempclass; var height weight; output out=tempstats (drop=_TYPE_ _FREQ_); run;

proc transpose data=tempstats out=tempstats2 (drop=_NAME_); var _numeric_; id _STAT_; run;

proc print data=tempstats2 label noobs; var _LABEL_ N MEAN STD MIN MAX; label _LABEL_ = 'Variable' N = 'N' MEAN = 'Mean' STD = 'Std Dev' MIN = 'Minimum' MAX = 'Maximum' ; run;

ods pdf close; ods listing;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SUBSCRIBE SAS-L JingJu11 S Sent: Friday, May 07, 2010 9:07 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: PROC MEANS printout without printing variable name?

If you print listing output directly, I think you are not able(at least very hard ) to suppress the variable name.On the other hand, if you really need the label and the label is no more than 32 characters, you can try:

options validvarname = any; ods pdf; proc means data = a(rename = (x = 'Label of x'n)); var 'Label of x'n; run; ods _all_ close; ods listing; options validvarname = v7;

Here you did not suppress variable name but replace it by a same-as-label variable name.

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