<?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: Reformat Data in SAS Enterprise Miner in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805349#M9142</link>
    <description>&lt;P&gt;You will have to make new variables and drop the old ones !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With below code : &lt;BR /&gt;(but if you want the code to automatically convert hundreds of character variables, you will have to make this dynamic and data driven) :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp(drop=old);
    old = '1,61';
    new = input(old,commax5.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you do not succeed in doing this in an efficient way (with only a few lines of code for all hundreds of character variables), I will put a program here in the weekend !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2022 16:13:09 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2022-03-31T16:13:09Z</dc:date>
    <item>
      <title>Reformat Data in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805265#M9139</link>
      <description>&lt;P&gt;I am importing a dataset in Enterprise Miner which contains interval values. However, all the decimal points is formatted using ',' as opposed to '.', e.g. "42,0", so it could not accept it as interval. Is there a way to change the formatting of the decimals to '.' and change the nominal to interval variables for all the columns that has this problem?&lt;/P&gt;&lt;P&gt;I have the example dataset attached.&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;I have tried using the SAS code node and inputted this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data &amp;amp;EM_EXPORT_TRAIN;
   set &amp;amp;EM_IMPORT_DATA;

   array vars [*] _character_;

   do i = 1 to dim(vars);
      vars[i] = compress(tranwrd(vars[i],"a","X"));
   end;

   drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;It changed all the ',' to '.', however I still do not know how to proceed as the next step shows error and the supposedly numerical variables are still counted as nominal.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 14:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805265#M9139</guid>
      <dc:creator>kevinma28</dc:creator>
      <dc:date>2022-03-31T14:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Data in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805339#M9140</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can give you the EM code node way to do this, but why aren't you doing this in the normal SAS editor BEFORE "uploading" (importing) the dataset to Enterprise Miner?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's way more straightforward. (In EM there's additionally the metadata role that you have to change.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;[EDIT] Sorry, not the role --&amp;gt; the measurement scale&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 15:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805339#M9140</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-03-31T15:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Data in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805346#M9141</link>
      <description>Sure, editing it outside EM is easier, but I need to show all the processes done to the dataset inside EM.</description>
      <pubDate>Thu, 31 Mar 2022 16:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805346#M9141</guid>
      <dc:creator>kevinma28</dc:creator>
      <dc:date>2022-03-31T16:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Data in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805349#M9142</link>
      <description>&lt;P&gt;You will have to make new variables and drop the old ones !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With below code : &lt;BR /&gt;(but if you want the code to automatically convert hundreds of character variables, you will have to make this dynamic and data driven) :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp(drop=old);
    old = '1,61';
    new = input(old,commax5.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you do not succeed in doing this in an efficient way (with only a few lines of code for all hundreds of character variables), I will put a program here in the weekend !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 16:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805349#M9142</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-03-31T16:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Data in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805608#M9153</link>
      <description>I'm doing an assignment and I need to show the processes in SAS Enterprise Miner</description>
      <pubDate>Sat, 02 Apr 2022 10:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/805608#M9153</guid>
      <dc:creator>kevinma28</dc:creator>
      <dc:date>2022-04-02T10:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Data in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/808283#M9162</link>
      <description>I managed to export the resulting data from the SAS code node as a CSV using the Save Data node and import them again. Thank you for all the help.</description>
      <pubDate>Mon, 18 Apr 2022 09:41:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/808283#M9162</guid>
      <dc:creator>kevinma28</dc:creator>
      <dc:date>2022-04-18T09:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Data in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/808313#M9163</link>
      <description>&lt;P&gt;Ah OK. Glad it is solved !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I forgot about this question in the past two weeks.&lt;BR /&gt;Do not let it deter you from asking more questions on this data science (or other) board(s).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 14:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reformat-Data-in-SAS-Enterprise-Miner/m-p/808313#M9163</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-04-18T14:34:14Z</dc:date>
    </item>
  </channel>
</rss>

