<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to round values in stat procedures in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348426#M80677</link>
    <description>&lt;P&gt;Use the maxdec option like this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data = sashelp.class nmiss N min max mean std maxdec = 2;
var _numeric_ ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 08 Apr 2017 16:27:50 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-04-08T16:27:50Z</dc:date>
    <item>
      <title>How to round values in stat procedures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348424#M80675</link>
      <description>&lt;P&gt;I treied to make all my statistical outputs to round 2 decimals. For example, here is code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods rtf file='c:\SAS\MeanOutput.rtf';&lt;BR /&gt;proc means data = sashelp.class nmiss N min max mean std;&lt;BR /&gt;var _numeric_ ;&lt;BR /&gt;format _numeric_ comma10.2;&lt;BR /&gt;run;&lt;BR /&gt;ods rtf close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where the format statement doen't work. Any help or suggestion would be appreciated. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Louis&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2017 16:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348424#M80675</guid>
      <dc:creator>louis_usa</dc:creator>
      <dc:date>2017-04-08T16:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to round values in stat procedures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348426#M80677</link>
      <description>&lt;P&gt;Use the maxdec option like this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data = sashelp.class nmiss N min max mean std maxdec = 2;
var _numeric_ ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Apr 2017 16:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348426#M80677</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-08T16:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to round values in stat procedures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348427#M80678</link>
      <description>It worked like a charm. Thank you so much!</description>
      <pubDate>Sat, 08 Apr 2017 16:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348427#M80678</guid>
      <dc:creator>louis_usa</dc:creator>
      <dc:date>2017-04-08T16:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to round values in stat procedures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348429#M80679</link>
      <description>&lt;P&gt;You already got a satisfactory answer, but that only changed the decimal places. It didn't apply the format you wanted (i.e. comma12.2).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to change the formats for proc means, you can do that using proc template. e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods path(prepend) work.templat(update);
proc template;
 edit base.summary;
  edit mean;
   format=comma12.2;
  end;
  edit sum;
   format=comma12.2;
  end;
  edit min;
   format=comma12.2;
  end;
  edit max;
   format=comma12.2;
  end;
  edit stddev;
   format=comma12.2;
  end;
 end;
run;

ods rtf file='/folders/myfolders/MeanOutput.rtf';
proc means data = sashelp.class nmiss N min max mean std;
  var _numeric_ ;
run;
ods rtf close;

proc template;
 delete base.summary;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2017 16:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348429#M80679</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-08T16:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to round values in stat procedures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348432#M80681</link>
      <description>Correct, I'm more interested in the change of the display. But thank you so much for showing me alternative way doing the format.</description>
      <pubDate>Sat, 08 Apr 2017 17:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-round-values-in-stat-procedures/m-p/348432#M80681</guid>
      <dc:creator>louis_usa</dc:creator>
      <dc:date>2017-04-08T17:06:23Z</dc:date>
    </item>
  </channel>
</rss>

