<?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: Changing data type and modeling type for multiple columns? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108870#M39550</link>
    <description>&lt;P&gt;You will need to use a For() loop and loop across the variables in question and change the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/big class.jmp");

colList = dt &amp;lt;&amp;lt; get column names(numeric);

For(i=1,i&amp;lt;=n items(colList), i++,
column(dt, colList[i]) &amp;lt;&amp;lt; data type("numeric");
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 04 Feb 2019 23:20:02 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2019-02-04T23:20:02Z</dc:date>
    <item>
      <title>Changing data type and modeling type for multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108857#M39546</link>
      <description>&lt;P&gt;I have 8 columns that I need to change data type, modeling type, and format&amp;nbsp;on, is there any way that I can do it as a grouping?&amp;nbsp; Or do I need to write my script for each individual column?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 21:36:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108857#M39546</guid>
      <dc:creator>PNash</dc:creator>
      <dc:date>2019-02-04T21:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Changing data type and modeling type for multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108866#M39547</link>
      <description>Hi,&lt;BR /&gt;Select all 8 columns, right-click on the header, choose Standardize Attributes, and then choose the attribute you wish to change (e.g. format, modeling type...)</description>
      <pubDate>Mon, 04 Feb 2019 21:49:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108866#M39547</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2019-02-04T21:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Changing data type and modeling type for multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108867#M39548</link>
      <description>&lt;P&gt;Is there a way to script that?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 21:56:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108867#M39548</guid>
      <dc:creator>PNash</dc:creator>
      <dc:date>2019-02-04T21:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Changing data type and modeling type for multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108870#M39550</link>
      <description>&lt;P&gt;You will need to use a For() loop and loop across the variables in question and change the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/big class.jmp");

colList = dt &amp;lt;&amp;lt; get column names(numeric);

For(i=1,i&amp;lt;=n items(colList), i++,
column(dt, colList[i]) &amp;lt;&amp;lt; data type("numeric");
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Feb 2019 23:20:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108870#M39550</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-02-04T23:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Changing data type and modeling type for multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108922#M39563</link>
      <description>&lt;P&gt;An alternate to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;'s solution is shown below.&amp;nbsp; The&amp;nbsp;Get Column Reference&lt;SPAN&gt;&amp;nbsp;message returns a list of references to the columns using the&amp;nbsp;&lt;/SPAN&gt;Column()&lt;SPAN&gt;&amp;nbsp;function.&amp;nbsp; It does not accept the same arguments that&amp;nbsp;&lt;/SPAN&gt;Get Column Names&lt;SPAN&gt;&amp;nbsp;does.&amp;nbsp; Instead, it accepts a list of column names or a matrix.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;By using Get Column Names as the argument, you can supply the desired list of column names to Get Column Reference.&amp;nbsp; Because the resulting list is a list of column references, the Data Type message can be sent to the list.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This example captures a list of column references for all numeric columns in the table and then changes the data type to character.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA\Big Class.jmp" );

//returns {Column( "age" ), Column( "height" ), Column( "weight" )}
colRefs = dt &amp;lt;&amp;lt; Get Column Reference( dt &amp;lt;&amp;lt; Get Column Names( "numeric" ) );  

colRefs &amp;lt;&amp;lt; Data Type( "Character" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope this is helpful!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 18:35:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-data-type-and-modeling-type-for-multiple-columns/m-p/108922#M39563</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2019-02-05T18:35:18Z</dc:date>
    </item>
  </channel>
</rss>

