Date: Sun, 12 Jan 2003 23:47:02 -0500
Reply-To: Bob Quale <b_quale@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bob Quale <b_quale@YAHOO.COM>
Subject: question about transposing a dataset
I am a new user of SAS. I am trying to do some kind of transposition on a
dataset, but could not figure it out myself.I hope someone here could help
out. Here is my original data set (the first row is the variable names):
ID v w
a 1 2
a 11 22
a 111 222
b 3 4
b 33 44
what I want looks like this:
ID v1 v2 v3 w1 w2 w3
a 1 11 111 2 22 222
b 3 33 . 4 44 .
that's, I need to transpose colunm 'v' and 'w' grouped by 'ID', but also
put the values of 'w' right after those of 'v'.
Thank you very much.