LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2011, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 **************************************


Back to: Top of message | Previous page | Main SAS-L page