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 (May 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 4 May 2010 17:16:53 +0100
Reply-To:     Ian Wakeling <Ian.Wakeling@HANANI.QISTATS.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ian Wakeling <Ian.Wakeling@HANANI.QISTATS.CO.UK>
Subject:      Re: Rotating rows
In-Reply-To:  <201005041446.o44Akol7030259@malibu.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

Perhaps PROC PLAN may be of some use??

proc plan; factors b=9 ordered a=3 of 9 cyclic (1 4 7) ; output out=cyc; run;

proc transpose data=cyc out=cyc; by b; run;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bill Behrens Sent: 04 May 2010 15:46 To: SAS-L@LISTSERV.UGA.EDU Subject: Rotating rows

I have a panel data set. I want to rotate the rows. Row numbers look like the following:

1 2 3 4 5 6 7 8 9

I want to do the following:

1 4 7 2 5 8 3 6 9 4 7 1 5 8 2 6 9 3 7 1 4 8 2 5 9 3 6

Of course the original dataset is much larger than this. Do you guys know any way to do this?

Bill


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