<?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: Step by Step Row &amp;quot;list&amp;quot; building: Get All Rows, then Get Rows Where X, then Get Rows Where Y (and X) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Step-by-Step-Row-quot-list-quot-building-Get-All-Rows-then-Get/m-p/911889#M107137</link>
    <description>&lt;P&gt;hogi,&lt;/P&gt;
&lt;P&gt;You've rescued me again.&amp;nbsp; Thanks!&lt;/P&gt;
&lt;P&gt;One clarification, I used your syntax&lt;/P&gt;
&lt;LI-CODE lang="jsl"&gt;list of rows = set intersect(list1, list2);&lt;/LI-CODE&gt;
&lt;P&gt;initially and it turned blue so I thought it was okay, but odd that it didn't capitalize.&amp;nbsp; Then I looked it up in scripting guide and realized it was "Set Intersection".&amp;nbsp; &amp;nbsp;Now I'm good to go.&amp;nbsp; Cheers!&lt;/P&gt;</description>
    <pubDate>Thu, 06 Nov 2025 23:15:44 GMT</pubDate>
    <dc:creator>MeanChris</dc:creator>
    <dc:date>2025-11-06T23:15:44Z</dc:date>
    <item>
      <title>Step by Step Row "list" building: Get All Rows, then Get Rows Where X, then Get Rows Where Y (and X)</title>
      <link>https://community.jmp.com/t5/Discussions/Step-by-Step-Row-quot-list-quot-building-Get-All-Rows-then-Get/m-p/911777#M107129</link>
      <description>&lt;P&gt;I'm trying to understand working with objects that are containers of rows.&amp;nbsp; Even that description may be incorrect.&lt;/P&gt;
&lt;P&gt;What is "FilteredRows" in this context?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
FilteredRows = dt &amp;lt;&amp;lt; get rows where( :Date == 12May2025 );
Show( N Rows( FilteredRows ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To back up slightly, is there a JSL command to set an object to ALL rows in a datatable?&amp;nbsp; Or is that never necessary?&lt;/P&gt;
&lt;P&gt;The closest I can find that avoids 'Select All Rows' is:&lt;/P&gt;
&lt;P&gt;AllRows = dt &amp;lt;&amp;lt; get rows where(1);&lt;/P&gt;
&lt;P&gt;Feels like cheating though.&lt;/P&gt;
&lt;P&gt;More importantly, I'd like to be able to apply additional filters to a subset of rows&lt;/P&gt;
&lt;P&gt;This does not work, but conveys the intent:&lt;/P&gt;
&lt;P&gt;XFilteredRows = dt &amp;lt;&amp;lt; get rows where( :X == 42 );&lt;BR /&gt;XYFilteredRows = XFilteredRows &amp;lt;&amp;lt; get rows where(:Y ==1.21);&lt;/P&gt;
&lt;P&gt;Yes, I can do both in one line&lt;/P&gt;
&lt;P&gt;XYFiteredRows = dt &amp;lt;&amp;lt; get rows where(:X==42 &amp;amp; :Y==1.21);&lt;/P&gt;
&lt;P&gt;However I plan to use this in a For Each Row loop, where X removes 99% of the rows, and I'll need to subsequently filter more parameters independently, i.e. rows that meet XY, and rows that meet XZ and rows that meet X but not Y, etc...&lt;/P&gt;
&lt;P&gt;I believe it will be faster on large tables to keep the X filtered rows.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a related note, one result I'm trying to get is very similar to the 'Group By' result, but with a custom formula.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JSL of a column formula:&lt;/P&gt;
&lt;P&gt;Col Mean( :Parameter, :X )&lt;/P&gt;
&lt;P&gt;'Group By' is very convenient for created column formula from built in functions, but when I want to do more complex math I don't know how to achieve the same grouping effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 17:19:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Step-by-Step-Row-quot-list-quot-building-Get-All-Rows-then-Get/m-p/911777#M107129</guid>
      <dc:creator>MeanChris</dc:creator>
      <dc:date>2025-11-06T17:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Step by Step Row "list" building: Get All Rows, then Get Rows Where X, then Get Rows Where Y (and X)</title>
      <link>https://community.jmp.com/t5/Discussions/Step-by-Step-Row-quot-list-quot-building-Get-All-Rows-then-Get/m-p/911866#M107134</link>
      <description>&lt;P&gt;The "container" is a (1 dimensional) "matrix".&lt;/P&gt;
&lt;P&gt;you can also create a matrix&amp;nbsp; manually:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;myRows= Matrix ({1,2,3})&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;myRows = 1::3&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;myRows = [1, 2, 3]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are 2 ways to intersect (and other set operations like union, difference)&lt;BR /&gt;&lt;BR /&gt;a) using &lt;STRONG&gt;associative arrays&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;aa1 = associative array (myRows1);
aa2 = associative array (myRows2);

aa1 &amp;lt;&amp;lt; intersect(aa2);&lt;BR /&gt;// aa1 &amp;lt;&amp;lt; remove(aa2);
list of rows = aa1 &amp;lt;&amp;lt; get keys;
rows= matrix(list of rows);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1762465541044.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86554i4D485F2CC6BDF34A/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_0-1762465541044.png" alt="hogi_0-1762465541044.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b) [new in JMP19]: using &lt;STRONG&gt;lists&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;list1 = as list (myRows1);
list2 = as list (myRows2);

&lt;STRIKE&gt;list of rows = set intersect(list1, list2);&lt;/STRIKE&gt;
list of rows = set intersection(list1, list2);
//list of rows = set difference(list1, list2);
rows= matrix(list of rows);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1762465805149.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86555i75BD1DC78757C751/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_1-1762465805149.png" alt="hogi_1-1762465805149.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Intersections for Matrices? I guess: no&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2025 05:34:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Step-by-Step-Row-quot-list-quot-building-Get-All-Rows-then-Get/m-p/911866#M107134</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-11-07T05:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Step by Step Row "list" building: Get All Rows, then Get Rows Where X, then Get Rows Where Y (and X)</title>
      <link>https://community.jmp.com/t5/Discussions/Step-by-Step-Row-quot-list-quot-building-Get-All-Rows-then-Get/m-p/911889#M107137</link>
      <description>&lt;P&gt;hogi,&lt;/P&gt;
&lt;P&gt;You've rescued me again.&amp;nbsp; Thanks!&lt;/P&gt;
&lt;P&gt;One clarification, I used your syntax&lt;/P&gt;
&lt;LI-CODE lang="jsl"&gt;list of rows = set intersect(list1, list2);&lt;/LI-CODE&gt;
&lt;P&gt;initially and it turned blue so I thought it was okay, but odd that it didn't capitalize.&amp;nbsp; Then I looked it up in scripting guide and realized it was "Set Intersection".&amp;nbsp; &amp;nbsp;Now I'm good to go.&amp;nbsp; Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 23:15:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Step-by-Step-Row-quot-list-quot-building-Get-All-Rows-then-Get/m-p/911889#M107137</guid>
      <dc:creator>MeanChris</dc:creator>
      <dc:date>2025-11-06T23:15:44Z</dc:date>
    </item>
  </channel>
</rss>

