<?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 Subsetting a data table into several data tables by column value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372254#M62215</link>
    <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;I want to split my data table into several smaller data tables that contain only the rows where a column has a certain value. This I want to do for all unique values of the column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the example of the Big Class data: I want to generate two data tables in which one has only the rows where sex= F and the other the rows where sex = M. They have to be two separate data tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With only a few value categories I could do it by hand by selecting/data filtering the rows and only subsetting the selected rows, but with over 50+ categories I am probably looking at a scripting option since point and click will take too long.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help? I guess I would need to find a way to loop over the unique values of my separation column and try to reproduce the subsetting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:27:55 GMT</pubDate>
    <dc:creator>Feli</dc:creator>
    <dc:date>2023-06-10T23:27:55Z</dc:date>
    <item>
      <title>Subsetting a data table into several data tables by column value</title>
      <link>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372254#M62215</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;I want to split my data table into several smaller data tables that contain only the rows where a column has a certain value. This I want to do for all unique values of the column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the example of the Big Class data: I want to generate two data tables in which one has only the rows where sex= F and the other the rows where sex = M. They have to be two separate data tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With only a few value categories I could do it by hand by selecting/data filtering the rows and only subsetting the selected rows, but with over 50+ categories I am probably looking at a scripting option since point and click will take too long.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help? I guess I would need to find a way to loop over the unique values of my separation column and try to reproduce the subsetting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:27:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372254#M62215</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2023-06-10T23:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Subsetting a data table into several data tables by column value</title>
      <link>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372259#M62217</link>
      <description>&lt;P&gt;Tables=&amp;gt;Subset has a Subset By checkbox that when checked, allows for the creation of a new subset for each level of the column(s) selected in the subset selection box&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="subset.PNG" style="width: 471px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/31626iA3DAC61CFEA42604/image-size/large?v=v2&amp;amp;px=999" role="button" title="subset.PNG" alt="subset.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 14:10:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372259#M62217</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-03-29T14:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Subsetting a data table into several data tables by column value</title>
      <link>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372368#M62230</link>
      <description>&lt;P&gt;In addition to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;when having so many tables, you may need to organize and change them in lists, see example.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

cdt = Open( "$SAMPLE_DATA\Big Class.jmp" );

tables = cdt &amp;lt;&amp;lt; Subset(
	By( :age ),
	All rows,
	Selected columns only( 0 ),
	columns( :name, :age, :height, :weight )
);
Wait( 3 );

For( i = 1, i &amp;lt;= N Items( tables ), i++,
	write( "closing: ", tables[i] &amp;lt;&amp;lt; get name , "\!n");
	wait(1);
	Close( tables[i], NoSave );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Mar 2021 17:15:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372368#M62230</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2021-03-29T17:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Subsetting a data table into several data tables by column value</title>
      <link>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372515#M62242</link>
      <description>Wow. How did I not know that?? That's exactly what I wanted. Thanks, &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;!</description>
      <pubDate>Tue, 30 Mar 2021 06:41:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subsetting-a-data-table-into-several-data-tables-by-column-value/m-p/372515#M62242</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2021-03-30T06:41:40Z</dc:date>
    </item>
  </channel>
</rss>

