<?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: Get min / max of selected data in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Get-min-max-of-selected-data/m-p/6868#M6862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&amp;nbsp; That is exactly the function i was looking for. I didn't realize that "get rows where()" existed... or that you could apply a list to the column and take a summary of that. Very nice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jun 2013 14:36:15 GMT</pubDate>
    <dc:creator>mikedriscoll</dc:creator>
    <dc:date>2013-06-06T14:36:15Z</dc:date>
    <item>
      <title>Get min / max of selected data</title>
      <link>https://community.jmp.com/t5/Discussions/Get-min-max-of-selected-data/m-p/6866#M6860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I would like to know the most efficient way to get the min and max of a subset of a column.&amp;nbsp;&amp;nbsp; I realize could do a select where(), and actually use the table subset function, and summarize, but I need the script to loop through thousands of columns (unique criteria per column) and I think opening / closing tables via subset is too slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping to do a select where() to select the rows, and then somehow get the selected data into a list, and return the min and max of the list. I've tried several things but haven't had any success. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a simple test script. In this case I would want to return the min = 66 and the max = 70.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear log();&lt;/P&gt;&lt;P&gt;clear globals();&lt;/P&gt;&lt;P&gt;names default to here (1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open( "$SAMPLE_DATA/Big Class.jmp" );&lt;/P&gt;&lt;P&gt;dtData = current data table();&lt;/P&gt;&lt;P&gt;dtData &amp;lt;&amp;lt; clear select;&lt;/P&gt;&lt;P&gt;dtData &amp;lt;&amp;lt; select where( :height &amp;gt; 65);&lt;/P&gt;&lt;P&gt;column("height") &amp;lt;&amp;lt; set selected(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 21:09:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-min-max-of-selected-data/m-p/6866#M6860</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2013-06-05T21:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get min / max of selected data</title>
      <link>https://community.jmp.com/t5/Discussions/Get-min-max-of-selected-data/m-p/6867#M6861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try &amp;lt;&amp;lt;get rows where() which should be faster than first selecting rows of interest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dtData &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"$SAMPLE_DATA/Big Class.jmp"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;rows &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; dtData &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; get rows where&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;:&lt;/SPAN&gt;height &lt;SPAN style="color: #011993;"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;65&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;min65 &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Min&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;:&lt;/SPAN&gt;height&lt;STRONG&gt;[&lt;/STRONG&gt;rows&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;max65 &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Max&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;:&lt;/SPAN&gt;height&lt;STRONG&gt;[&lt;/STRONG&gt;rows&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;Show&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; min65&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; max65 &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;SPAN style="color: #011993;"&gt;/*&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;min65 = 66;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;max65 = 70;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;*/&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 08:42:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-min-max-of-selected-data/m-p/6867#M6861</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-06-06T08:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Get min / max of selected data</title>
      <link>https://community.jmp.com/t5/Discussions/Get-min-max-of-selected-data/m-p/6868#M6862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&amp;nbsp; That is exactly the function i was looking for. I didn't realize that "get rows where()" existed... or that you could apply a list to the column and take a summary of that. Very nice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 14:36:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-min-max-of-selected-data/m-p/6868#M6862</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2013-06-06T14:36:15Z</dc:date>
    </item>
  </channel>
</rss>

