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 (June 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 25 Jun 2009 15:17:15 -0700
Reply-To:   "Schwarz, Barry A" <>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Schwarz, Barry A" <>
Subject:   Re: transpose help
In-Reply-To:   <>
Content-Type:   text/plain; charset="us-ascii"

Sort by id and visit

In a data step: Keep id visit alb albunit alt altunit Loop through records If test is "alb", set alb and albunit to values in val and unit Else if test is "alt", set ... Else produce an error message If last.visit, output values to new data set Endloop

-----Original Message----- From: kasa Sent: Thursday, June 25, 2009 2:22 PM To: SAS-L@LISTSERV.UGA.EDU Subject: transpose help


I Have the following data id visit test val unit 101 1 alb 4.8 gms 101 1 alt 14 kgs 101 2 alb 5.4 gms 101 2 alt 17 kgs

I need to transpose data as in needed data. needed id visit alb albunit alt altunit 101 1 4.8 gms 14 kgs 101 2 5.4 gms 17 kgs

Any suggestions highly appreciated.


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