<?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: Converting or replicating array variables from character to numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Converting-or-replicating-array-variables-from-character-to/m-p/695380#M212190</link>
    <description>&lt;P&gt;You must have a second array, because you cannot change the type of a variable.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2020 23:04:30 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-10-29T23:04:30Z</dc:date>
    <item>
      <title>Converting or replicating array variables from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-or-replicating-array-variables-from-character-to/m-p/695379#M212189</link>
      <description>&lt;P&gt;Hello guys.&lt;/P&gt;&lt;P&gt;I have this array with character variables, even though values are all 0 and 1 or ' ' for missing value. I need these variables in a numeric format but I am having a hard time. Is there a way to do so without creating another array?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dritan007_0-1604011462305.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51227i63BB557D3EF59CEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dritan007_0-1604011462305.png" alt="Dritan007_0-1604011462305.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Data looks like this.&lt;/P&gt;&lt;P&gt;I have referenced all the variables with an array, however the format I don't want character.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 22:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-or-replicating-array-variables-from-character-to/m-p/695379#M212189</guid>
      <dc:creator>Dritan007</dc:creator>
      <dc:date>2020-10-29T22:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Converting or replicating array variables from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-or-replicating-array-variables-from-character-to/m-p/695380#M212190</link>
      <description>&lt;P&gt;You must have a second array, because you cannot change the type of a variable.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 23:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-or-replicating-array-variables-from-character-to/m-p/695380#M212190</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-29T23:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Converting or replicating array variables from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-or-replicating-array-variables-from-character-to/m-p/695381#M212191</link>
      <description>How did you import or create the data? Can you change it in a prior step - this is definitely possible if you imported the data from a text file. &lt;BR /&gt;&lt;BR /&gt;If you created it, you can back up and modify your code. Otherwise, duplicate arrays are your best bet and pretty straightforward though definitely an annoyance.&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;array _orig(*) $2 &amp;lt;list of old vars&amp;gt;; *can be automated somewhat;&lt;BR /&gt;array _new(*) &amp;lt;list of new_vars&amp;gt;; *can be automated somewhat;&lt;BR /&gt;do i=1 to dim(_orig);&lt;BR /&gt;if not missing(_orig(i)) then _new(i) = input(orig(i), 8.);&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;drop &amp;lt;list of old vars&amp;gt;;&lt;BR /&gt;run;</description>
      <pubDate>Thu, 29 Oct 2020 23:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-or-replicating-array-variables-from-character-to/m-p/695381#M212191</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-29T23:13:17Z</dc:date>
    </item>
  </channel>
</rss>

