proc means noprint - I only need 1 decimal...

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

proc means noprint - I only need 1 decimal...

Hi!

I use this program to find mean values of age:

proc means noprint Data=ID;

by ID;

var age;

output out=age mean=meanAGE;

proc print data=age;

run;


It works fine, but I'm just wondering if it is possible to tell SAS to give me only 1 decimal in the output??

Thanks!


Accepted Solutions
Solution
‎10-10-2014 11:48 AM
SAS Employee
Posts: 416

Re: proc means noprint - I only need 1 decimal...

Hello -

How about:

proc print data=age;

format meanAGE 8.1;

run;

Thanks,

Udo

View solution in original post


All Replies
Solution
‎10-10-2014 11:48 AM
SAS Employee
Posts: 416

Re: proc means noprint - I only need 1 decimal...

Hello -

How about:

proc print data=age;

format meanAGE 8.1;

run;

Thanks,

Udo

Contributor
Posts: 25

Re: proc means noprint - I only need 1 decimal...

Perfect! Thanks! :smileygrin:

Trusted Advisor
Posts: 1,228

Re: proc means noprint - I only need 1 decimal...

Or if you want to see format with one decimal in proc means output, change variable age's format in your original dataset as 8.1

Contributor
Posts: 25

Re: proc means noprint - I only need 1 decimal...

smart! Thanks Smiley Happy

Occasional Contributor
Posts: 13

Re: proc means noprint - I only need 1 decimal...

You could format the variable when you print it.

proc print data=age; 

  format meanAGE 4.1;

run;                


🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 281 views
  • 3 likes
  • 4 in conversation