<?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 How to select my main data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-select-my-main-data-table/m-p/668802#M85682</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm working on a data table and I made a script to make several subsets of it. I'm going through a for loop to automate some modeling analysis. the first iteration goes well : do the subest, launch a fit model in the subset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then in the second iteration of the loop, it doesn't work anymore, because the selected table is the subset and not the main table. I can't find the right commands to assigm the current data table to my original table. Any ideas?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 13:47:39 GMT</pubDate>
    <dc:creator>bobmorrane</dc:creator>
    <dc:date>2023-08-17T13:47:39Z</dc:date>
    <item>
      <title>How to select my main data table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-my-main-data-table/m-p/668802#M85682</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm working on a data table and I made a script to make several subsets of it. I'm going through a for loop to automate some modeling analysis. the first iteration goes well : do the subest, launch a fit model in the subset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then in the second iteration of the loop, it doesn't work anymore, because the selected table is the subset and not the main table. I can't find the right commands to assigm the current data table to my original table. Any ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 13:47:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-my-main-data-table/m-p/668802#M85682</guid>
      <dc:creator>bobmorrane</dc:creator>
      <dc:date>2023-08-17T13:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to select my main data table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-my-main-data-table/m-p/668865#M85689</link>
      <description>&lt;P&gt;Are you referring to your data tables by name, or are you working with the current data table? In other words, does your script look like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "data table.jmp" );

dt2 = dt &amp;lt;&amp;lt; Subset( ... );
dt2 &amp;lt;&amp;lt; Fit Model( ... );

dt &amp;lt;&amp;lt; subset( ... );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "data table.jmp" );

Subset( ... );
Fit Model( ... );

subset( ... );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or, perhaps something completely different?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 14:36:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-my-main-data-table/m-p/668865#M85689</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2023-08-17T14:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to select my main data table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-my-main-data-table/m-p/668872#M85692</link>
      <description>&lt;P&gt;You need to either assign a variable to reference the main table, or reference it using it"s name&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = 
// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "/C:/Program Files/SAS/JMPPRO/16/Samples/Data/big class.jmp" );

ages = Associative Array( dt:age ) &amp;lt;&amp;lt; get keys;

For Each( {year}, ages, 

	dt &amp;lt;&amp;lt; select where( :sex == "F" &amp;amp; :age == year );
	dt &amp;lt;&amp;lt; Subset(
		Selected Rows( 1 ),
		,
		Selected columns only( 0 )
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "/C:/Program Files/SAS/JMPPRO/16/Samples/Data/big class.jmp" );

ages = Associative Array( data table("big class"):age ) &amp;lt;&amp;lt; get keys;

For Each( {year}, ages, 

	Data Table( "big class" ) &amp;lt;&amp;lt; select where( :sex == "F" &amp;amp; :age == year );
	Data Table( "big class" ) &amp;lt;&amp;lt; Subset(
		Selected Rows( 1 ),
		,
		Selected columns only( 0 )
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Aug 2023 14:53:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-my-main-data-table/m-p/668872#M85692</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-08-17T14:53:49Z</dc:date>
    </item>
  </channel>
</rss>

