Date: Tue, 18 Jan 2005 11:18:43 -0800
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject: Re: Rename multiple variables
Content-type: text/plain; charset=US-ASCII
"Li,Qian [Ontario]" <Qian.Li@EC.GC.CA> wrote:
> I have a dataset containing 224 variables. I need to output the mean
> std values for each variable with DIFFERENT names. Are there better
> to do this using SQL procedure or DATA step?
> [immense unneeded %LET statement omitted]
You don't need SQL or a DATa step or anything. PROC MEANS and
PROC SUMMARY have an AUTONAME option in the OUTPUT statement.
Give PROC MEANS your list of variables in the VAR statement,
and use the OUTPUT statement with the AUTONAME option to get
a data set with the means and stds, all named appropriately.
You might also take a look at the AUTOLABEL option as well.
David Cassell, CSC
Senior computing specialist