<?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: Replace values in a column in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827832#M35371</link>
    <description>Thank you! It works perfectly!</description>
    <pubDate>Tue, 09 Aug 2022 12:58:08 GMT</pubDate>
    <dc:creator>NewUsrStat</dc:creator>
    <dc:date>2022-08-09T12:58:08Z</dc:date>
    <item>
      <title>Replace values in a column</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827823#M35369</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I set to 0 all numbers in a column of a data-set that are negative?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 12:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827823#M35369</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2022-08-09T12:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Replace values in a column</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827826#M35370</link>
      <description>&lt;P&gt;How about&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   do _N_ = 1 to 100;
      x = rand('integer', -10, 10);
      output;
   end;
run;

data have;
   modify have;
   x = max(x, 0);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2022 12:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827826#M35370</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-08-09T12:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replace values in a column</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827832#M35371</link>
      <description>Thank you! It works perfectly!</description>
      <pubDate>Tue, 09 Aug 2022 12:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827832#M35371</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2022-08-09T12:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replace values in a column</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827836#M35372</link>
      <description>&lt;P&gt;If you have missing values for some numbers, should they also be set to zero?&amp;nbsp; I'm going to assume the answer is no, only re-set the negative numbers.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   array nums {*} _numeric_;
   do _n_=1 to dim(nums);
      if .Z &amp;lt; nums{_n_} &amp;lt; 0 then nums{_n_} = 0;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the intent is to set missing values to zero as well, the program becomes even easier.&amp;nbsp; Just remove the characters ".Z &amp;lt; "&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 13:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-values-in-a-column/m-p/827836#M35372</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2022-08-09T13:02:37Z</dc:date>
    </item>
  </channel>
</rss>

