| Date: | Tue, 6 Sep 2005 04:14:14 -0400 |
| Reply-To: | Arild S <kog@SSB.NO> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Arild S <kog@SSB.NO> |
| Subject: | Re: transpose data |
|---|
On Tue, 6 Sep 2005 12:46:27 +0530, Mohit Bhatia <mohit.b.bhatia@AEXP.COM>
wrote:
>I am calculating mean of some values in a dataset and then setting the
output >to a dataset.Then i take a transpose of this dataset.But my class
variable >takes the value col2 col3 and so on .How can i make it display
the value it >takes ?
Hi, just as a tip: you would have found an answer to this quickly if
you searced the archives. It's a common issue, I think..
See if this example gets you going:
data testdata;
input @1 month $3. @4 age;
format age 3.0;
cards;
jan 23
jan 34
jan 32
feb 34
feb 23
feb 31
mar 32
mar 27
mar 26
;
run;
proc means data=testdata noprint nway order=data;
class month;
var age;
output out=temp (drop=_type_) mean=;
run;
proc transpose data=temp out=temp2 name=variable;
id month;
var age;
run;
proc print data=temp2 noobs;
run;
A
|