| Date: | Wed, 29 Aug 2001 10:40:21 -0700 |
| Reply-To: | Cassell.David@EPAMAIL.EPA.GOV |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "David L. Cassell" <Cassell.David@EPAMAIL.EPA.GOV> |
| Subject: | Re: Anyone can help? Thanks!!! |
| Content-type: | text/plain; charset=us-ascii |
|---|
Kit wrote [in part]:
> Original Data
> A P1 P2 P3
> 1 56 78 5
> 2 23 99 6
> . . . .
> Actually, I wanted to get the data in the order of
> X Y
> 1 56
> 1 78
> 1 5
> . . . .
Greg Woolridge already gave you a good DATA-step solution.
But you can also do this with PROC TRANSPOSE. In fact, this
is the sort of thing for which TRANSPOSE is designed. Try:
proc transpose data=original out=new(drop=_name_ _label_) prefix=Y;
var P1-P3;
by A;
run;
David
--
David Cassell, CSC
Cassell.David@epa.gov
Senior computing specialist
mathematical statistician
|