Date: Mon, 7 Jan 2008 09:44:51 -0800
Reply-To: "ajs2004@bigfoot.com" <ajs2004@BIGFOOT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "ajs2004@bigfoot.com" <ajs2004@BIGFOOT.COM>
Organization: http://groups.google.com
Subject: Re: Transpose question
Content-Type: text/plain; charset=ISO-8859-1
If the purpose is to get readable output in that tabular form, you
probably wanted to use PROC TABULATE or maybe PROC REPORT instead of
PROC UNIVARIATE.
On Jan 7, 4:51 pm, sas...@GMAIL.COM (sas biology) wrote:
> Hello Group,
>
> I have a complicated transposition to do . Could you help me with this?
>
> I have the following data that i got from proc univariate.
>
> *
>
> data
> *have;
>
> input
> group result test $ _n _mean _std _max _min;
>
> cards
> ;
>
> 1 0 sod 34 19 10 35 9
>
> 1 0 pot 30 55 14 96 25
>
> 1 0 chl 93 201 37 307 131
>
> 1 0 mag 89 58 16 106 27
>
> 1 1 sod 30 55 14 96 25
>
> 1 1 pot 89 58 16 106 27
>
> 1 1 chl 34 19 10 35 9
>
> 1 1 mag 93 201 37 307 131
>
> 2 0 sod 33 18 9 34 8
>
> 2 0 pot 30 55 14 96 25
>
> 2 0 chl 93 201 37 307 131
>
> 2 0 mag 89 58 16 106 27
>
> 2 1 sod 32 18 8 32 7
>
> 2 1 pot 89 58 16 106 27
>
> 2 1 chl 30 55 14 96 25
>
> 2 1 mag 93 201 37 307 131
>
> ;
> *
>
> run
> *;
>
> I need to transpose in such a way that the ouyput data should look like this
> test ds group1/result0 group1/ result1 group2/result0 group2/
> result1
>
> sod n 34 30 33
> 32
> sod mean 19 55
> 18 18
> sod std 10 14 9
> 8
> sod max 35 96 34
> 32
> sod min 9
> 25 8 7
>
> Similarly for the other three tests.
>
> Thanks .
>
> SB
|