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 (December 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 2 Dec 2008 15:27:28 -0500
Reply-To:   Akshaya Nathilvar <akshaya.nathilvar@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Akshaya Nathilvar <akshaya.nathilvar@GMAIL.COM>
Subject:   Re: How to transpose the data in my way?
Comments:   To: Ruby <windofoct@gmail.com>
In-Reply-To:   <2a1deb23-314c-4328-8f49-154ec98c47e1@j38g2000yqa.googlegroups.com>
Content-Type:   text/plain; charset=ISO-8859-1

One possible solution: Data have; input ID $ A1 A2 A3 B1 B2 B3; cards; QQ 1 2 3 5 2 4 GG 3 8 3 6 7 4 WW 4 5 6 6 1 8 ;

Data want; set have; array abc a1-a3; array xyz b1-b3; do over abc; A=abc; B=xyz; output; end; keep ID A B; Run;

Akshaya

On Tue, Dec 2, 2008 at 2:55 PM, Ruby <windofoct@gmail.com> wrote:

> Hello folks, > > Does anybody know how to transpose the data? I extracted my data in a > simple way as showed below. As always, I appreciate all your helps > very much. > > ID A1 A2 A3 B1 B2 B3 > QQ 1 2 3 5 2 4 > GG 3 8 3 6 7 4 > WW 4 5 6 6 1 8 > > ID A B > QQ 1 5 > QQ 2 2 > QQ 3 4 > GG 3 6 > GG 8 7 > GG 3 4 > WW 4 6 > WW 5 1 > WW 6 8 >


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