Date: Sat, 9 Apr 2005 07:38:38 -0400
Reply-To: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Subject: Re: Rearranging values of repeated measures in a table
Hi Arjen,
See (two lne URL!):
http://listserv.uga.edu/cgi-bin/wa?A2=ind0504A&L=sas-
l&P=R17188&D=1&H=0&O=D&T=1
Same question on SAS-L, only four days ago!
Regards - Jim.
On Fri, 8 Apr 2005 23:15:45 -0700, a.benedictus@GMAIL.COM wrote:
>Hi guys,
>
>As a non-experienced SAS-programmer I am encountering some basic
>problems.
>I have THIS table (actually it's a 1000 times bigger, but that doesn't
>matter for now):
>
>ID SampleResult
>101 0.7
>101 0.0
>103 0.0
>107 0.4
>107 0.6
>107 0.6
>107 0.8
>126 0.7
>126 0.7
>133 0.7
>
>That I would like to organize like THIS (via DATASTEP!):
>
>ID SR1 SR2 SR3 SR4 SR5 etc
>101 0.7 0.0 . .
>103 0.0 . . .
>107 0.4 0.6 0.6 .
>126 0.7 . . .
>133 0.7 . . .
>
>So, on each row I would like to see just one ID, and the several
>samples per ID on the same row. The number of possible sample-results
>(e.g. 0.4, 0.7 etc) is limited (up to ten). Not all cows (the ID's are
>from cows) have been sampled the same number of times. Could anyone
>explain me how to do this? Should it be someting with an array?
>
>Thanks a lot!
>
>Arjen
|