| Date: | Sun, 7 Mar 2010 13:53:15 -0800 |
| Reply-To: | Henry <chchanghenry@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Henry <chchanghenry@GMAIL.COM> |
| Organization: | http://groups.google.com |
| Subject: | Re: Data manipulation related to proc tanspose |
|
| Content-Type: | text/plain; charset=ISO-8859-1 |
Hi Art,
Thanks gain for your great help!
On Mar 7, 9:28 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote:
> Henry,
>
> You could acccomplish what you want simply by capturing and sorting on the
> second character in _name_. e.g.,:
>
> data want;
> set have;
> sort_order=substr(_NAME_,2,1);
> run;
>
> proc sort data=want;
> by momrf descending sort_order;
> run;
>
> HTH,
> Art
> --------
>
>
>
> On Sat, 6 Mar 2010 14:13:22 -0800, Henry <chchanghe...@GMAIL.COM> wrote:
> >Hi Dear All,
>
> >I have a data set looks like the following:
>
> >momrf _NAME_ _1 _2 _3
> >1 mtret -0.294869774 -0.267294138 -0.254943904
> >1 mjret -0.154368329 0 0.187300705
> >1 mcret -0.140501445 -0.267294138 -0.442244609
> >1 tt -49.84622863 -43.77815215 -
> 40.73987575
> >1 tj -72.5822342 0 59.83536336
> >1 tc -31.73318703 -43.77815215 -
> 53.94403017
> >2 mtret -0.077125095 -0.072394681 -0.069766292
> >2 mjret -0.089764708 0 0.144586163
> >2 mcret 0.012639613 -0.072394681 -0.214352455
> >2 tt -13.48633061 -12.56075581 -
> 12.01574256
> >2 tj -68.70014048 0 73.95849997
> >2 tc 2.575270149 -12.56075581 -
> 32.42329725
>
> >I will like to get the following format:
>
> >momrf _NAME_ _1 _2 _3
> >1 mtret -0.294869774 -0.267294138 -0.254943904
> >1 tt -49.84622863 -43.77815215 -
> 40.73987575
> >1 mjret -0.154368329 0 0.187300705
> >1 tj -72.5822342 0 59.83536336
> >1 mcret -0.140501445 -0.267294138 -0.442244609
> >1 tc -31.73318703 -43.77815215 -
> 53.94403017
> >2 mtret -0.077125095 -0.072394681 -
> 0.069766292
> >2 tt -13.48633061 -12.56075581 -
> 12.01574256
> >2 mjret -0.089764708 0 0.144586163
> >2 tj -68.70014048 0 73.95849997
> >2 mcret 0.012639613 -0.072394681 -
> 0.214352455
> >2 tc 2.575270149 -12.56075581 -
> 32.42329725
> >3 mtret 0.034123008 0.037802852 0.04119101
> >3 tt 5.798801994 6.416947754
> 6.890561851
> >3 mjret -0.075934046 0 0.140086453
> >3 tj -77.02722189 74.5241284
> >3 mcret 0.110057054 0.037802852 -0.098895443
> >3 tc 19.69425247 6.416947754 -
> 16.55840112
>
> >In short, I want the t value right below its mean for each of these
> >three columns.
> >Could anyone give me some suggestions? Any advice is gratefully
> >welcome!
>
> >Thanks in advance!!!
|