<?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 Round function confusion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Round-function-confusion/m-p/391124#M93886</link>
    <description>&lt;P&gt;I have optained a mix of whole numbers(eg. 1, 2, 3) and non whole numbers (something like 0.12345678, 9.123456) by using proc means. Now in my dataset, I tried using round function, but that rounds only the non whole number (eg 0.1 or 9.1) nut whole numbers stay the same eg.(1, 2, 3).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is :&lt;/P&gt;&lt;P&gt;1.0&lt;/P&gt;&lt;P&gt;2.0&lt;/P&gt;&lt;P&gt;3.0&lt;/P&gt;&lt;P&gt;0.1&lt;/P&gt;&lt;P&gt;9.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code: variable_new= strip(round(variable_old,0.1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ANy help is greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Sun, 27 Aug 2017 13:18:22 GMT</pubDate>
    <dc:creator>VinnyR</dc:creator>
    <dc:date>2017-08-27T13:18:22Z</dc:date>
    <item>
      <title>Round function confusion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Round-function-confusion/m-p/391124#M93886</link>
      <description>&lt;P&gt;I have optained a mix of whole numbers(eg. 1, 2, 3) and non whole numbers (something like 0.12345678, 9.123456) by using proc means. Now in my dataset, I tried using round function, but that rounds only the non whole number (eg 0.1 or 9.1) nut whole numbers stay the same eg.(1, 2, 3).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is :&lt;/P&gt;&lt;P&gt;1.0&lt;/P&gt;&lt;P&gt;2.0&lt;/P&gt;&lt;P&gt;3.0&lt;/P&gt;&lt;P&gt;0.1&lt;/P&gt;&lt;P&gt;9.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code: variable_new= strip(round(variable_old,0.1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ANy help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2017 13:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Round-function-confusion/m-p/391124#M93886</guid>
      <dc:creator>VinnyR</dc:creator>
      <dc:date>2017-08-27T13:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Round function confusion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Round-function-confusion/m-p/391125#M93887</link>
      <description>&lt;P&gt;Have you used round as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; var = round(var,0.1);&lt;/P&gt;
&lt;P&gt;and assign: &amp;nbsp;format var 5.1; &amp;nbsp; /* one decimal digit. addapt the length */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you still have issues, post your code.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2017 13:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Round-function-confusion/m-p/391125#M93887</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-08-27T13:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Round function confusion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Round-function-confusion/m-p/391126#M93888</link>
      <description>&lt;P&gt;The round function works correctly. &amp;nbsp;An integer rounded to 0.1 is that integer. &amp;nbsp;I suspect that you do not want to round at all. &amp;nbsp;Rather, use a format like 5.1 (or w.1 for a larger width w) to keep the original precision but display one decimal place.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2017 14:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Round-function-confusion/m-p/391126#M93888</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-08-27T14:41:36Z</dc:date>
    </item>
  </channel>
</rss>

