<?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: How to retrieve tabulated values by script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/344006#M59359</link>
    <description>Great suggestion Ian,&lt;BR /&gt;&lt;BR /&gt;Would indeed make my life easier for this specific purpose!</description>
    <pubDate>Wed, 23 Dec 2020 11:14:16 GMT</pubDate>
    <dc:creator>HubP_SDe</dc:creator>
    <dc:date>2020-12-23T11:14:16Z</dc:date>
    <item>
      <title>How to retrieve tabulated values by script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343800#M59319</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the Tabulated output below, please how can I retrieve the amounts for categories 1, 2, 3 by script?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HubP_SDe_0-1608650110296.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29070i37319A9AC5ED3579/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HubP_SDe_0-1608650110296.png" alt="HubP_SDe_0-1608650110296.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on another working script I`m currently there in my tries:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;r = TabulateQuantiles &amp;lt;&amp;lt; report;
tb_TabQuant = r[Table Box( 1 )];
tb_TabQuant &amp;lt;&amp;lt; GetText;
QuantAmount1 = tb_TabQuant[2][1];
QuantAmount2 = tb_TabQuant[2][2];
QuantAmount3 = tb_TabQuant[2][2];
Show(QuantAmount1, QuantAmount2, QuantAmount3);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;But getting following error:&lt;/P&gt;
&lt;PRE&gt;Cannot subscript Display Box in access or evaluation of 'r[Table Box(1)]' , r[/*###*/Table Box( 1 )]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:01:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343800#M59319</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2023-06-09T22:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve tabulated values by script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343819#M59320</link>
      <description>&lt;P&gt;This will put the values into a new table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

tab = 
dt &amp;lt;&amp;lt; Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Grouping Columns( :age ) ),
		Row Table( Analysis Columns( :height ), Statistics( Mean ) )
	)
);

Wait(2);
dt2 = tab &amp;lt;&amp;lt; makeIntoDataTable;
dt2 &amp;lt;&amp;lt; setName("Tabulation from "||(dt &amp;lt;&amp;lt; getName));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 15:35:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343819#M59320</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2020-12-22T15:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve tabulated values by script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343824#M59324</link>
      <description>&lt;P&gt;Thanks a lot Ian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Tabulate Analysis does not behave like others thenm simply using &lt;EM&gt;[Table Box( i )] ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sorry, but i`m now struggling with retrieving the data from the data tablem and could not find it in the Scripting index:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DataTable from script-1.png" style="width: 800px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29071iCC18495BE8F8F9C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="DataTable from script-1.png" alt="DataTable from script-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:37:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343824#M59324</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2020-12-22T16:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve tabulated values by script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343827#M59327</link>
      <description>&lt;P&gt;Yes, if you can avoid plucking values from the display tree that's usually a good strategy. If you want to get the values into variables, you can do something like this ('levels' will be a list, 'vals' a matrix):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

tab = 
dt &amp;lt;&amp;lt; Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Grouping Columns( :age ) ),
		Row Table( Analysis Columns( :height ), Statistics( Mean ) )
	)
);

dt2 = tab &amp;lt;&amp;lt; makeIntoDataTable;
dt2 &amp;lt;&amp;lt; setName("Tabulation from "||(dt &amp;lt;&amp;lt; getName));

cols = dt2 &amp;lt;&amp;lt; getColumnNames(:String);
RemoveFrom(cols, 1, 2);

dt3 = dt2 &amp;lt;&amp;lt;
Transpose(
	columns(Eval(cols)),
	Transpose selected rows only( 1 ),
	Label( :Statistics ),
	Output Table( (dt2 &amp;lt;&amp;lt; getName) )
	);

levels = Column(dt3, "Label") &amp;lt;&amp;lt; getValues;
vals = Column(dt3, "Mean") &amp;lt;&amp;lt; getValues;

Close(dt2, NoSave);
Close(dt3, NoSave);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Dec 2020 17:22:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343827#M59327</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2020-12-22T17:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve tabulated values by script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343870#M59333</link>
      <description>&lt;P&gt;Thanks again Ian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is obviously the complex way, but it would be usefull in case I need to retrieve whole columns I suppose ;)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;I finally managed after finding the right syntax in the OnLine help page:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;tb_TabQuant = TabulateQuantiles &amp;lt;&amp;lt; MakeIntoDataTable(Invisible);
//tb_TabQuant &amp;lt;&amp;lt; setName("Tabulation from "||(dt &amp;lt;&amp;lt; getName));
/*
QuantAmount1 = "24636";
QuantAmount2 = "1036";
QuantAmount3 = "257";
*/
QuantAmount1 = tb_TabQuant[1,1];
QuantAmount2 = tb_TabQuant[1,2];
QuantAmount3 = tb_TabQuant[1,3];
Show(QuantAmount1, QuantAmount2, QuantAmount3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The last blocking thing for my case wqs to convert these 3 values into stringsm which I managed using Char(number)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Have a great End of Year&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 17:46:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/343870#M59333</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2020-12-22T17:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve tabulated values by script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/344005#M59358</link>
      <description>&lt;P&gt;The best way to do something depends on what, precisely you need to do and how it fits into what you already have (and even then, 'best' is open to interpretation). But you might be able to use 'Summarize()', and dispense with 'Tabulate' altogether:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
Summarize( exg = By( :age ), exm = Mean( :height ) );
Print(exg, exm);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 11:09:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/344005#M59358</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2020-12-23T11:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve tabulated values by script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/344006#M59359</link>
      <description>Great suggestion Ian,&lt;BR /&gt;&lt;BR /&gt;Would indeed make my life easier for this specific purpose!</description>
      <pubDate>Wed, 23 Dec 2020 11:14:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-retrieve-tabulated-values-by-script/m-p/344006#M59359</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2020-12-23T11:14:16Z</dc:date>
    </item>
  </channel>
</rss>

