Date: Tue, 31 Jan 2006 16:49:41 -0500
Reply-To: Jay Weedon <jweedon@EARTHLINK.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jay Weedon <jweedon@EARTHLINK.NET>
Organization: http://newsguy.com
Subject: Re: How to put obs that are in different rows into one row
Content-Type: text/plain; charset=us-ascii
On Tue, 31 Jan 2006 13:35:10 -0800, toby989@hotpop.com wrote:
>Hi All
>
>My data looks like:
>
>organizatonid subjectid m1 m2 m3 m4 m5
>2 1 55 66 77 44 55
>2 2 54 64 22 65 26
>4 3 56 77 34 73 84
>4 4 54 23 54 11 65
>5 5 34 73 26 73 74
>5 6 34 55 23 55 45
>5 7 34 36 34 24 74
>
>And I want
>oid m11 m12 m13 m14 m15 m21 m22 m23 m24 m25 m31 m32 m33 m34 m35
>2 55 66 77 44 55 54 64 22 65 26
>4 56 77 34 73 84 54 23 54 11 65
>5 34 73 26 73 74 34 55 23 55 45 34 36 34 24 74
>
>The dataset is huge. There are more than 5 measurements illustrated
>above, there are more than 3 subjects per organization, and there are
>more than these 3 organizations.
>
>I was thinking of using set or merge in a datastep together with a do
>(it.) statement but then I cant access the counter to create variable
>names. I am also not expereinced enought to know how to access specific
>rows with their obs number.
Look at proc transpose.
JW
|