<?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: Concatenate data table from subset in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Concatenate-data-table-from-subset/m-p/432136#M68180</link>
    <description>&lt;P&gt;Get reference of the subset and then use that for looping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Analgesics.jmp");

dt_subset = dt &amp;lt;&amp;lt; Subset(
	Output Table("Subset_of_analgesics"),
	By(:gender),
	All rows,
	Selected columns only(0),
	columns(:drug, :pain)
);
Show(dt_subset);

//dt_subset is a list, use N items to get items in the list
For(i = 1, i &amp;lt;= N Items(dt_subset), i++,
	dt &amp;lt;&amp;lt; Concatenate(dt_subset[i], Append To first table(1));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 02 Nov 2021 11:00:51 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-11-02T11:00:51Z</dc:date>
    <item>
      <title>Concatenate data table from subset</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenate-data-table-from-subset/m-p/432108#M68176</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have to subset a data table and concatenate the data tables one by one into another file.&lt;/P&gt;
&lt;P&gt;How can I concatenate the data tables from the subset table to the original table? please help, im really not sure how to do it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's my sample data:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "Analgesics" ) &amp;lt;&amp;lt; Subset(
    Output Table( "dt_subset" ),
    By( :gender ),
    All rows,
    Selected columns only( 0 ),
    columns( :drug, :pain )
);

// concatenating to my original data table
For( i = 1, i &amp;lt;= 10, i++, //not sure on this one
    dt &amp;lt;&amp;lt; concatenate( dt_subset( i ), Append to First Table( 1 ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:39:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenate-data-table-from-subset/m-p/432108#M68176</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-06-10T23:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate data table from subset</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenate-data-table-from-subset/m-p/432136#M68180</link>
      <description>&lt;P&gt;Get reference of the subset and then use that for looping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Analgesics.jmp");

dt_subset = dt &amp;lt;&amp;lt; Subset(
	Output Table("Subset_of_analgesics"),
	By(:gender),
	All rows,
	Selected columns only(0),
	columns(:drug, :pain)
);
Show(dt_subset);

//dt_subset is a list, use N items to get items in the list
For(i = 1, i &amp;lt;= N Items(dt_subset), i++,
	dt &amp;lt;&amp;lt; Concatenate(dt_subset[i], Append To first table(1));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Nov 2021 11:00:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenate-data-table-from-subset/m-p/432136#M68180</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-02T11:00:51Z</dc:date>
    </item>
  </channel>
</rss>

