Date: Thu, 9 Jul 2009 11:24:11 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: proc tabulate rows and columns
Try to replace the '*' with ',' in the table statement:
table (todate1 todate2 .. frdate12), (n*f=comma9.0 mean median min max);
On Thu, 9 Jul 2009 10:32:09 -0400, Kristin Graves <gravesk@CONED.COM> wrote:
>Hello all -
>
>I want to print formatted summary statistics (mean, median, min, and max)
>on several date variables. PROC MEANS doesn't seem to allow me to format
>the results, so I am using PROC TABULATE. I am getting nice formatted
>numbers, but the layout isn't what I'm looking for.
>
>My PROC MEANS code looks something like this, which gives me one compact
>table with each variable in its own row and the statistics in different
>columns:
>
>proc means data=temp n mean median min max sum;
> var todate1-todate12 frdate1-frdate12;
>run;
>
>My PROC TABULATE code looks like this. I get the formatting I want, but
>the results are printed in one long horizontal table that breaks across
>several pages:
>
>proc tabulate data=temp format=date7.;
> var todate1-todate12 frdate1-frdate12;
> table (todate1 todate2 [..snip...] frdate12)*(n*f=comma9.0 mean median
>min max);
>run;
>
>Is there any way to get the compact table layout of PROC MEANS combined
>with the formatted values from PROC TABULATE?
>
>thanks in advance for any help,
>Kristin Graves
|