<?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: if-then follow up to renaming in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/if-then-follow-up-to-renaming/m-p/88290#M25182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You appear to be missing some ELSE keywords.&lt;/P&gt;&lt;P&gt;The first block of IF/THEN/ELSE clauses will convert the value to 0,1,2, or 3.&lt;/P&gt;&lt;P&gt;The second block will then flip those into 2 or 0.&amp;nbsp; The 0's will be come 1's and the higher numbers will be 0's.&lt;/P&gt;&lt;P&gt;The third block will then flip the 1/0 values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you are trying to create three new variables from each existing variable?&lt;/P&gt;&lt;P&gt;Or perhaps you really wanted to do some type of aggregation over the values? If so did you want to aggregate horizontally across the variables in a particular observation or vertically across the observations in your dataset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Oct 2012 22:17:36 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-10-06T22:17:36Z</dc:date>
    <item>
      <title>if-then follow up to renaming</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-follow-up-to-renaming/m-p/88289#M25181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a follow up question. I want to change these values but when I do it my values are only 0's and 1's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data IEEE.item_coded (drop=item1-item116 iii);&lt;/P&gt;&lt;P&gt;set IEEE.item;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array f_item(116);&lt;/P&gt;&lt;P&gt;array item(*) item1-item116;&lt;/P&gt;&lt;P&gt;do iii=1 to 116;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if item{iii}&amp;lt;0.000623175 then f_item{iii}=3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if item{iii} lt 0.002864969 then f_item{iii}=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if item{iii} lt 0.013617708 then f_item{iii}=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if item{iii} le 0.431834293 then f_item{iii}=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if item{iii} lt 0.001041523 then f_item{iii}=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if item{iii} lt 0.008116862 then f_item{iii}=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if item{iii} le 0.431834293 then f_item{iii}=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if item{iii} lt 0.002864969 then f_item{iii}=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if item{iii} le 0.431834293 then f_item{iii}=0;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2012 21:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-follow-up-to-renaming/m-p/88289#M25181</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2012-10-06T21:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: if-then follow up to renaming</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-follow-up-to-renaming/m-p/88290#M25182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You appear to be missing some ELSE keywords.&lt;/P&gt;&lt;P&gt;The first block of IF/THEN/ELSE clauses will convert the value to 0,1,2, or 3.&lt;/P&gt;&lt;P&gt;The second block will then flip those into 2 or 0.&amp;nbsp; The 0's will be come 1's and the higher numbers will be 0's.&lt;/P&gt;&lt;P&gt;The third block will then flip the 1/0 values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you are trying to create three new variables from each existing variable?&lt;/P&gt;&lt;P&gt;Or perhaps you really wanted to do some type of aggregation over the values? If so did you want to aggregate horizontally across the variables in a particular observation or vertically across the observations in your dataset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2012 22:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-follow-up-to-renaming/m-p/88290#M25182</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-06T22:17:36Z</dc:date>
    </item>
  </channel>
</rss>

