LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 1 May 2008 16:18:55 -0500
Reply-To:     Citam <citam.sasl@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Citam <citam.sasl@GMAIL.COM>
Subject:      Re: manipulation/transposition question
In-Reply-To:  <UkqSj.8755$1m3.4840@trndny02>
Content-Type: text/plain; charset=ISO-8859-1

On 5/1/08, Theorbo <reply@to-group.nfo> wrote: > Hi. I have a dataset like this: > ID, MONTH, DAY, MeasureA, MeasureB, MeasureC > 1,2,13,243,221,254 > 2,2,13,244,255,263 > 1,2,13,255,278,233 > 1,2,14,223,211,266 > 2,2,15,223,277,265 > > with multiple observations per ID, month and day. I have about 25 of these > measures - all numeric. > > I am trying to get to this output dataset (to dump into Excel - don't get me > started!): > > ID, Avg_A_Month1, Avg_B_Month1, Avg_C_Month1, Avg_A_Month2, Avg_B_Month2 > > where I have one observation per ID with averages for the measures > aggregated by month. > > I know it's not good to keep my "data" in the variable names - isn't that > right? > What's the best way for me to get from start to output? > I started by trying to do a proc means nway noprint, class month, out= ... > and then transposing the output dataset but then I'm left with one variable > that contains all the variable names. Do I need to transpose twice? > > Any ideas? Thanks for any tips or suggestions - no code necessary.

The MEANS procedure wrapped inside the HTML output of ODS, which can be directly opened in Excel and saved as a .xls file?


Back to: Top of message | Previous page | Main SAS-L page