Date: Sat, 29 Jan 2011 18:44:04 +0100
Reply-To: Keith Larson <keith.larson@ZOOEKOL.LU.SE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Keith Larson <keith.larson@ZOOEKOL.LU.SE>
Subject: transpose?
Content-Type: text/plain; charset=ISO-8859-1
Dear list,
I would like to transpose some data. I have created a example:
data test;
input ID Position $ Value;
datalines;
1 P1 12
1 P2 13
1 P3 32
1 P4 23
2 P1 13
2 P2 23
2 P3 23
2 P4 22
;
I would like a table that looks like:
data test2;
input ID P1 P2 P3 P4;
datalines;
ID P1, P2, P3, P4
1,12,13,32,23
2,13,23,23,22
;
Cheers,
Keith
**************************************
Keith Larson, PhD Student
Animal Ecology, Lund University
Sölvegatan 37
223 62 LUND
Sweden
Phone: +46 (0)46 2229014
Mobile: +46 (0)73 0465016
Fax: +46 (0)46 2224716
Skype: sternacaspia
FB: keith.w.larson@gmail.com
**************************************
|