<?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 select and exclude rows from dt1 based on unique list of values from dt2? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390689#M64084</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3552"&gt;@brady_brady&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good questions. So my source data (dt1) has Chart_ID as Numeric Nominal. After creating charts and running t-Test then outputting a Combined Data Table (dt2) the Chart_ID column is Character Nominal.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jun 2021 20:31:57 GMT</pubDate>
    <dc:creator>aliegner1</dc:creator>
    <dc:date>2021-06-04T20:31:57Z</dc:date>
    <item>
      <title>How to select and exclude rows from dt1 based on unique list of values from dt2?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390582#M64072</link>
      <description>&lt;P&gt;so I'm using dt1 to run t-test analysis (Mean by Chamber by ChartID) then creating a combined data table, dt2, of all the pvalues. I want to filter this down to rows where p&amp;lt;=0.05, then create a distinct, unique list of these low pValues and use that to replot my chart with just the low PValues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a bit stuck now trying to link back to the original dt1. The final select where doesn't seem to be working.&lt;/P&gt;&lt;P&gt;also to note, if there's a better way to select, exclude, join back to source dt, please let me know. I tried summary, associative array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//creating the table of pValues
dt2 = Report( ow[1] )["Means Comparisons", "Comparisons for all pairs using Tukey-Kramer HSD","Ordered Differences Report"][Table Box( 1 )] &amp;lt;&amp;lt; Make Combined Data Table;
dt2 &amp;lt;&amp;lt; set name( "pValue PairWise by Channel Tukey")

//select and exclude high pVals
dt2 &amp;lt;&amp;lt; select where("p-Value"n &amp;gt; 0.05);
dt2 &amp;lt;&amp;lt; exclude;

//get list of remaining Unique Chart_ID's
summarize(uniqueVals=by(CHART_ID));

//trying to select on the original source data
dt1 &amp;lt;&amp;lt; select where( contains( uniqueVals, :CHART_ID));
//then need to invert and exclude&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:48:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390582#M64072</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2023-06-09T19:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to select and exclude rows from dt1 based on unique list of values from dt2?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390631#M64077</link>
      <description>&lt;P&gt;Are your chart IDs, by chance, numeric? The by() result in Summarize is a list of character strings--even if the original group identifiers were numbers. This will prevent those list elements (which, again, are strings) from matching any values in the original table (which are numbers).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Brady&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 19:45:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390631#M64077</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-06-04T19:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to select and exclude rows from dt1 based on unique list of values from dt2?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390641#M64078</link>
      <description>&lt;P&gt;My first guess would be mismatch between character and numerical values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is an example with Big Class:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
ow = Oneway(Y(:height), X(:age), All Pairs(1));
dt2 = Report(ow)["Means Comparisons", "Comparisons for all pairs using Tukey-Kramer HSD","Ordered Differences Report"][Table Box( 1 )] &amp;lt;&amp;lt; Make Combined Data Table;
dt2 &amp;lt;&amp;lt; set name( "pValue PairWise by Channel Tukey");
dt2 &amp;lt;&amp;lt; select where(:"p-Value"n &amp;gt; 0.05);
dt2 &amp;lt;&amp;lt; exclude;
summarize(dt2, uniqueVals=by(:level)); //check out the type of :level column, could be character
//convert to numbers OR you could convert values in dt1 to characters
For( i = 1, i &amp;lt;= N Items(uniqueVals ), i++,
	uniqueVals[i] = Num(uniqueVals[i] )
);

dt1 &amp;lt;&amp;lt; select where(Contains(uniqueVals, :age));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Jun 2021 19:57:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390641#M64078</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-04T19:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to select and exclude rows from dt1 based on unique list of values from dt2?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390689#M64084</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3552"&gt;@brady_brady&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good questions. So my source data (dt1) has Chart_ID as Numeric Nominal. After creating charts and running t-Test then outputting a Combined Data Table (dt2) the Chart_ID column is Character Nominal.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 20:31:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390689#M64084</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2021-06-04T20:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to select and exclude rows from dt1 based on unique list of values from dt2?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390729#M64085</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so after doing the summarize, it looks like the Chart_ID is Numeric Continuous, while the original source data dt1 Chart_ID is numeric Nominal, and the pvalue table dt2 is Character Nominal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//extra, just to look at the data
dtUnique = New Table( "uniqueVals less 0.05");
dtUnique &amp;lt;&amp;lt; New Column( "ChannelID", Values(uniqueVals));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aliegner1_0-1622840040791.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33282iC712ADCA069E1EB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_0-1622840040791.png" alt="aliegner1_0-1622840040791.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 20:55:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390729#M64085</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2021-06-04T20:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to select and exclude rows from dt1 based on unique list of values from dt2?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390895#M64092</link>
      <description>&lt;P&gt;uniqueVals varible has to have same Data Type as dt1, so you can choose which one you would change. If you don't need to have Chart_ID as numeric data type, I would most likely change that to Character in dt1 in this case.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 07:46:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-and-exclude-rows-from-dt1-based-on-unique-list-of/m-p/390895#M64092</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-05T07:46:36Z</dc:date>
    </item>
  </channel>
</rss>

