Date: Thu, 15 Mar 2007 16:03:38 -0500
Reply-To: SAS_learner <proccontents@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_learner <proccontents@GMAIL.COM>
Subject: Re: How to Transpose this dataset??
In-Reply-To: <BAY123-F199F4675C78B39131384B5DE720@phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Thank you so much Toby you really Rock , That is exactly what I wanted
thanks
On 3/15/07, toby dunn <tobydunn@hotmail.com> wrote:
>
> Proc Transpose
> Data = V_Avg2
> Out = Trans_Vis Prefix = Visit ;
> By PT ;
> Var PreDose4 ;
> Id Visit_Vis ;
> Run ;
>
>
>
> Toby Dunn
>
> To sensible men, every day is a day of reckoning. ~John W. Gardner
>
> The important thing is this: To be able at any moment to sacrifice that
> which we are for what we could become. ~Charles DuBois
>
> Don't get your knickers in a knot. Nothing is solved and it just makes you
> walk funny. ~Kathryn Carpenter
>
>
>
>
>
>
> From: SAS_learner <proccontents@GMAIL.COM>
> Reply-To: SAS_learner <proccontents@GMAIL.COM>
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: How to Transpose this dataset??
> Date: Thu, 15 Mar 2007 15:29:54 -0500
>
> Hello guys,
>
> I am sorry guys It is one of those days I can't think and no time to play
> around so please forgive me for posting lot questions with out trying
> myself
> a lot , well I need to transpose a data set which like this
>
> pt visit_vis predose4 001001 1 001001 2 001001 3 32.33333 001001 4
> 25.125 001001 5 14.67857 001001 6 10.04878 001001 7 10 001001 8 8 001001 9
> 8
> 001002 1 001002 2 001002 3 37.33333 001002 4 29.96296 001002 5 20.75
> 001002 6 12.41379 001002 7 10 001002 8 10 001002 9 10 001002 400 10
>
> to look like this
>
> pt visit1 visit2 visit3 visit4 visit5 visit6 visit7 visit8 visit9 visit
> 400 001001 32.33333 25.125 14.67857 10.04878 10 8 8 001002 37.33333
> 29.96296 20.75 12.41379 10 10 10 10
>
> for this I am using following code is giving me error I do not know where
> I
> am going wrong
>
>
> 395 proc transpose data = v_avg2 out = trans_vis prefix = visit ;
> 396 var visit_vis ;
> 397 id predose4 ;
> 398 by pt ;
> 399 run ;
>
> ERROR: The ID value "visit8" occurs twice in the same BY group.
> NOTE: The above message was for the following by-group:
> Patient=001001
> ERROR: The ID value "visit10" occurs twice in the same BY group.
>
> _________________________________________________________________
> Find what you need at prices you'll love. Compare products and save at
> MSN(r)
> Shopping.
>
> http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102&tcode=T001MSN20A0701
>
|