<?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: Subset data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38210#M22371</link>
    <description>&lt;P&gt;Thanks Craige_Hales for reply.&lt;/P&gt;
&lt;P&gt;But i now only can generate the individual subset data table.&lt;BR /&gt;How can i generate out all the subset data table? i have 5 f_d there, so i need generate out 5 subset data table.&lt;/P&gt;
&lt;P&gt;In my coding, i have using loop, but it seems cannot functions.&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2017 00:40:28 GMT</pubDate>
    <dc:creator>blue1994</dc:creator>
    <dc:date>2017-04-17T00:40:28Z</dc:date>
    <item>
      <title>Subset data table</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38205#M22367</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;From my previous post, i face the subset data problem. I using the hard coding to list down the subset data table one by one.&lt;/P&gt;
&lt;P&gt;But now i want dynamic the code, one of the reason that i don't want list down one by one(hard coding ) is if in future I have 50 F D in one dataset, so is impossible to me to list down the F D one by one right?&lt;/P&gt;
&lt;P&gt;I try using the script below, but still have errors, and it only print the first f_d's subset data table for me only.&lt;/P&gt;
&lt;P&gt;So, how can i do it to iterate until the 5 f_d?(because now i have 5 f_d)&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( &amp;lt;path to open data table&amp;gt;);


// Change the column name "F D" to "f_d"" to match the example
dt:F D &amp;lt;&amp;lt; set name( "f_d" );
a = {"S_GX_F40", "S_GX_Z40","S_III_E110","S_III_E80","S_III_SL150"};
dt &amp;lt;&amp;lt; Select Where( Starts With( :f_d, a[1] ) );&lt;BR /&gt;baseDT = dt &amp;lt;&amp;lt; Subset( output table name( "Subset" ), selected rows( 1 ), selected columns( 0 ) );&lt;BR /&gt;For( i = 1, i &amp;lt;= N Items( a ), i++,&lt;BR /&gt;dt &amp;lt;&amp;lt; Select Where( Starts With( :f_d, a ) );&lt;BR /&gt;TempDT = dt &amp;lt;&amp;lt; Subset( output table name( "Subset" ), selected rows( 1 ), selected columns( 0 ) );&lt;BR /&gt;baseDT = baseDT &amp;lt;&amp;lt; concatenate( TempDT, append to first table( 1 ) );&lt;BR /&gt;Close( TempDT, nosave );&lt;BR /&gt;);&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Apr 2017 13:14:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38205#M22367</guid>
      <dc:creator>blue1994</dc:creator>
      <dc:date>2017-04-16T13:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data table</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38206#M22368</link>
      <description>&lt;P&gt;It keep comes out with this error when i run the script:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;argument should be character{1} in access or evaluation of 'Starts With' , Bad Argument( S ), Starts With/*###*/(:f_d, a)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So, how to I solve it?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Apr 2017 14:12:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38206#M22368</guid>
      <dc:creator>blue1994</dc:creator>
      <dc:date>2017-04-16T14:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data table</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38209#M22370</link>
      <description>&lt;P&gt;Is the column a character column? In the message there is no subscript on "a" which might mean it is a list rather than an element of the list.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$sample_data/big class.jmp" );
letters = {"B", "C"};
dt &amp;lt;&amp;lt; selectWhere( Starts With( dt:name, letters[2] ) );
dt &amp;lt;&amp;lt; subset( selected rows( 1 ) );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Names starting with C" style="width: 496px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/5895i6DE9D7A5E9979CFB/image-size/large?v=v2&amp;amp;px=999" role="button" title="datatable.PNG" alt="Names starting with C" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Names starting with C&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 00:28:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38209#M22370</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2017-04-17T00:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data table</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38210#M22371</link>
      <description>&lt;P&gt;Thanks Craige_Hales for reply.&lt;/P&gt;
&lt;P&gt;But i now only can generate the individual subset data table.&lt;BR /&gt;How can i generate out all the subset data table? i have 5 f_d there, so i need generate out 5 subset data table.&lt;/P&gt;
&lt;P&gt;In my coding, i have using loop, but it seems cannot functions.&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 00:40:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38210#M22371</guid>
      <dc:creator>blue1994</dc:creator>
      <dc:date>2017-04-17T00:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data table</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38211#M22372</link>
      <description>&lt;P&gt;I have solve my subset data table problem already&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 01:47:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-data-table/m-p/38211#M22372</guid>
      <dc:creator>blue1994</dc:creator>
      <dc:date>2017-04-17T01:47:56Z</dc:date>
    </item>
  </channel>
</rss>

