Date: Tue, 1 Dec 2009 10:53:42 -0500
Reply-To: joey m <sasuser.joey.m@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: joey m <sasuser.joey.m@GMAIL.COM>
Subject: Re: controlling decimal places from proc means
In-Reply-To: <200912011536.nB1Bm7B5004718@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Hi Art:
I tried that but I think that does not have an effect on the means I
calculate using proc report.
I used the proc means portion to have a quick look of what I wanted to print
into a table, then proc report make the means and std calculations, too.
There I have problems controlling the decimals.
Regards,
Joey.
On Tue, Dec 1, 2009 at 10:36 AM, Arthur Tabachneck <art297@netscape.net>wrote:
> Jo,
>
> Would the maxdec option suffice? E.g.,:
>
> proc means data=sashelp.class maxdec=2;
> var height;
> run;
>
> Art
> -------
> On Tue, 1 Dec 2009 10:05:18 -0500, joey m <sasuser.joey.m@GMAIL.COM>
> wrote:
>
> >Hello boys and girls:
> >
> >Could you please tell me how to control the decimal places put in the
> means
> >and std in my table?
> >
> >I would like to put 2 (i.e. 358.12) and now I am getting something like
> >358.115986586).
> >
> >Thanks a lot and regards.
> >
> >Jo.
> >
> >
> >proc means data=file_in n mean std;
> > class batch treatment;
> > var result;
> >run;
> >
> >options pageno=1;
> >proc printto file="C:\means.txt";
> >run;
> >
> >proc report data=file_in nowindows headline ;
> > column week batch treatment result,(n mean std);
> >
> > define day / group left id 'Week' width=10;
> > define batch / group left id 'Batch' width=10;
> > define treatment / group left id 'Treatment' width=16;
> > define result / analysis "My Variable (secs)" center;
> >
> > compute after batch;
> >
> > line ' ';
> >
> > endcomp;
> >
> >title1 "Title for my means";
> >title3 "Number of observations (N), Average (mean) and standard deviation
> >(std)";
> >footnote1 " ";
> >
> >run;
>
|