Date: Thu, 31 Jul 2008 10:17:58 +0530
Reply-To: Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Subject: Re: Transposing observations into variables
In-Reply-To: <200807302031.m6UKFDQM021598@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
I am not sure I understand the entire problem, but assuming that the
variable with the value "EPS" and value "Time1" are different, I would
suggest that first create a new variable which is the concatenation of
the two -
x = compress(var1 || "_" || var2)
Also, assuming that the remaining variables are numeric,
proc tranpose data = <inds> out = <outds>;
by <aavar>;
id x;
run;
On Thu, Jul 31, 2008 at 2:01 AM, Alain Bonacossa
<a-bonacossa@kellogg.northwestern.edu> wrote:
> Hello,
> I have the following dataset:
>
> AA EPS Time1 3 4 5 etc
> AA EBI Time1 3 4 5 etc
> AA EPS Time2 3 4 5 etc
> AA ABI Time2 3 4 5 etc
>
> I would like to transpose it to look so that each time observation became a
> new variable, and retaining the values associated with the old variables:
>
> AA EPS_time1 ESP_time2 ABI_time1 ABI_time2.
>
> Do you have any suggestions on how to accomplish this?
> Thanks in advance,
> Alain
>
|