<?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: Convert column type from character to numeric in SAS enterprise miner in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434387#M6686</link>
    <description>&lt;DIV class="sasSource"&gt;I get the same error with the period! A SAS newbie here, so struggling here. Thanks for your patience.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;70&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;71 proc freq data=Quartda.quart_data_35yrs_pruned;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 tables invrmq;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 where invrmq &amp;gt; ' ' and input(invrmq, ??32.) = . ;&lt;/DIV&gt;</description>
    <pubDate>Mon, 05 Feb 2018 21:12:01 GMT</pubDate>
    <dc:creator>tnaveen80150</dc:creator>
    <dc:date>2018-02-05T21:12:01Z</dc:date>
    <item>
      <title>Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/418665#M6414</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently importing an xlsx file into SAS EM using the file import node.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I check my variables after the import has run, a number of continuous variables have been labelled as nominal and character type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a number of other variables that are exactly the same (i.e. numeric) that have been successfully imported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am unable to work out how to change the type from character to numeric in SAS EM, any thoughts?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 02:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/418665#M6414</guid>
      <dc:creator>Jack_FG</dc:creator>
      <dc:date>2017-12-06T02:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/418667#M6415</link>
      <description>&lt;P&gt;If the importing process "decided" to make these character variables, it probably has a reason.&amp;nbsp; It would pay to look at the cases where a numeric is not possible, and possibly fix the data on the Excel side before importing.&amp;nbsp; Here's an easy way to find the trouble makers:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=already_imported;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;tables troublesome_charvar;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;where troublesome_charvar &amp;gt; ' ' and input(troublesome_charvar, ??32.) = .;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 02:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/418667#M6415</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-12-06T02:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/420039#M6432</link>
      <description>&lt;P&gt;I had a cheeky NA in one of my numeric columns - hence the problem. Thankyou.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 09:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/420039#M6432</guid>
      <dc:creator>Jack_FG</dc:creator>
      <dc:date>2017-12-11T09:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434370#M6684</link>
      <description>&lt;P&gt;Is there an error in this code? I tried implementing it for a similar problem that I am facing and received the following error/s.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;70&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;71 proc freq data=Quartda.quart_data_35yrs_pruned;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 tables invrmq;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 where invrmq &amp;gt; ' ' and input(invrmq, ??32) = . ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;22&lt;/DIV&gt;&lt;DIV class="sasError"&gt;76&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Syntax error while parsing WHERE clause.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 22-322: Expecting a format name.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 run;&lt;/DIV&gt;</description>
      <pubDate>Mon, 05 Feb 2018 20:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434370#M6684</guid>
      <dc:creator>tnaveen80150</dc:creator>
      <dc:date>2018-02-05T20:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434372#M6685</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/174666"&gt;@tnaveen80150&lt;/a&gt;, the format needs a period (.) at the end, so:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;??32.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Feb 2018 20:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434372#M6685</guid>
      <dc:creator>paulkaefer</dc:creator>
      <dc:date>2018-02-05T20:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434387#M6686</link>
      <description>&lt;DIV class="sasSource"&gt;I get the same error with the period! A SAS newbie here, so struggling here. Thanks for your patience.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;70&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;71 proc freq data=Quartda.quart_data_35yrs_pruned;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 tables invrmq;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 where invrmq &amp;gt; ' ' and input(invrmq, ??32.) = . ;&lt;/DIV&gt;</description>
      <pubDate>Mon, 05 Feb 2018 21:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434387#M6686</guid>
      <dc:creator>tnaveen80150</dc:creator>
      <dc:date>2018-02-05T21:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434399#M6687</link>
      <description>&lt;P&gt;I haven't used the ?? modifiers in the input statement. &lt;A href="https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000180357.htm" target="_self"&gt;Here&lt;/A&gt; they show examples with space after the ??.&lt;/P&gt;
&lt;P&gt;You might also just try replacing ??32. with something like best8., just to try it.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 22:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434399#M6687</guid>
      <dc:creator>paulkaefer</dc:creator>
      <dc:date>2018-02-05T22:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434409#M6688</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/81362"&gt;@paulkaefer&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried it with the space too; did not work still. Neither did 'best8.'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure what is wrong and am still confused. Thanks a lot for your help though.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 22:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434409#M6688</guid>
      <dc:creator>tnaveen80150</dc:creator>
      <dc:date>2018-02-05T22:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434552#M6690</link>
      <description>&lt;P&gt;Hmm, this &lt;EM&gt;is&lt;/EM&gt; a tricky one! Maybe &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;, who posted the original code snippet, can weigh in?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 14:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434552#M6690</guid>
      <dc:creator>paulkaefer</dc:creator>
      <dc:date>2018-02-06T14:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434656#M6692</link>
      <description>&lt;P&gt;Hmmm ... it looks like that suggestion works in an IF statement, but not in a WHERE statement.&amp;nbsp; To avoid creating an entirely new data set, feed a view in to PROC FREQ:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test / view=test;&lt;/P&gt;
&lt;P&gt;set already_imported (keep=troublesome_charvar);&lt;/P&gt;
&lt;P&gt;if troublesome_charvar &amp;gt; ' ' and input(troublesome_charvar, ??32.) = .;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc freq data=test;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;tables troublesome_charvar;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 19:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434656#M6692</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-06T19:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column type from character to numeric in SAS enterprise miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434675#M6693</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/81362"&gt;@paulkaefer&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked !!! Indeed, it seems to work with IF and not WHERE.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 19:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Convert-column-type-from-character-to-numeric-in-SAS-enterprise/m-p/434675#M6693</guid>
      <dc:creator>tnaveen80150</dc:creator>
      <dc:date>2018-02-06T19:32:57Z</dc:date>
    </item>
  </channel>
</rss>

