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 (March 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 30 Mar 2006 17:26:58 -0500
Reply-To:     Rushi Patel <rushi.b.patel@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Rushi Patel <rushi.b.patel@GMAIL.COM>
Subject:      horizontal data into vertical
Content-Type: text/plain; charset=ISO-8859-1

SAS-L,

I an interested in transforming the following horizontal data into vertical..

id a1992 b1992 a1993 b1993 a1994 b1994 1 10 VR 10 VR 20 RV 2 20 VR 25 RV 30 XX ....

into

id year a b 1 1992 10 VR 1 1993 10 VR 1 1994 20 RV 2 1992 20 VR 2 1993 25 RV 2 1994 30 XX

I tried

PROC TRANSPOSE data = dat1 out = out1; by id; var a1992 - a1994 b1992 - b1994; run;

but this would give both a and b under one column.

Thanks,

Rushi


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