Date: Fri, 21 Jun 2002 11:13:51 -0700
Reply-To: MNess@CROMEDICA.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Matthew Ness <MNess@CROMEDICA.COM>
Subject: Re: Using Variable Values in New Variables Names
Content-type: text/plain; charset=us-ascii
Hi Jess,
It's a little tough to help you without having a more detailed example or
knowing exactly what you want, but proc transpose has an id statement that
will use values of a variable as names for the new, transposed variables.
For example:
data test;
x=5;
run;
proc transpose data=test out=trans (drop=_:) prefix=y;
id x;
var x;
run;
Perhaps that may put you on the right track...
Matt
"Balint, Jess"
<JBalint@ALLDA To: SAS-L@LISTSERV.UGA.EDU
TA.NET> cc:
Sent by: Subject: Using Variable Values in New
"SAS(r) Variables Names
Discussion"
<SAS-L@LISTSER
V.UGA.EDU>
21/06/02 10:55
AM
Please respond
to "Balint,
Jess"
I tried this:
data test;
x = 1;
y&x = 2;
run;
But that doesn't work. Could somebody point me in the right direction here?
I have values in a dataset that I am trying to transforms and don't feel
like writing a page full of if statements. Thanks.
[Jess]