<?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: select rows of colnames based on value, then exclude those columns in another dt? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573050#M78196</link>
    <description>&lt;P&gt;Your JSL seems to work in the simple example that I ran.&amp;nbsp; It sets the column property to Excluded for those columns with a p-value greater than .05.&amp;nbsp; What are you finding that is different?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 22:53:04 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-11-23T22:53:04Z</dc:date>
    <item>
      <title>select rows of colnames based on value, then exclude those columns in another dt?</title>
      <link>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573028#M78194</link>
      <description>&lt;P&gt;Looking for help....i'm wonding if a scripting syntax may have changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running some statistics and t-tests on a data table with thousands of columns. I'm then generating a summary 'combined data table' to sort the p-value column. I then want to select/exclude based on p-value but it seems to not be working at all. any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/***********************************/
/*pVal selection*/
// Create the combined data table, using xPath (return a list of the OutlineBoxes from the report that have the title Ordered Differences Report.  Then, use the first of those to make the combined data table.)
outlines = (Report( ow1[1] ) &amp;lt;&amp;lt; Top Parent) &amp;lt;&amp;lt; XPath( "//OutlineBox[text()='Ordered Differences Report']" );
dt1 = outlines[1][Table Box( 1 )] &amp;lt;&amp;lt; Make Combined Data Table;

dt1 = current data table();

//Select the rows w/ low pVal, create a String value of all the Column Names, by selected row
pVals = Loc(dt1:"p-Value"n &amp;lt;&amp;lt; get as matrix &amp;gt; 0.05); 
comparisonStrings = {};
For(i = 1, i &amp;lt;= N Items(pVals), i++,
	Insert Into(comparisonStrings, char(dt1:Y[pVals[i]]));
);
show(comparisonStrings);

//Go to source dt, select all Cols that match the string and exclude. You're left with only Cols from charts w low pVal.
dt_Data_Wide &amp;lt;&amp;lt; clear select;
dt_Data_Wide &amp;lt;&amp;lt; Clear Column Selection();
colList = dt_Data_Wide &amp;lt;&amp;lt; Get Column Names( String ); /*gets a list of all columns*/
For( i = 1, i &amp;lt;= N Items( comparisonStrings ), i++,
  If( Contains( colList, Char( comparisonStrings[i] ) ),
  Column( dt_Data_Wide , Char( comparisonStrings[i] ) ) &amp;lt;&amp;lt; Set Selected( 1 ) &amp;lt;&amp;lt; exclude( 1 )
  )
);
dt_Data_Wide &amp;lt;&amp;lt; clear select;
dt_Data_Wide &amp;lt;&amp;lt; Clear Column Selection();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:57:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573028#M78194</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2023-06-10T23:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: select rows of colnames based on value, then exclude those columns in another dt?</title>
      <link>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573050#M78196</link>
      <description>&lt;P&gt;Your JSL seems to work in the simple example that I ran.&amp;nbsp; It sets the column property to Excluded for those columns with a p-value greater than .05.&amp;nbsp; What are you finding that is different?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 22:53:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573050#M78196</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-11-23T22:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: select rows of colnames based on value, then exclude those columns in another dt?</title>
      <link>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573058#M78197</link>
      <description>&lt;P&gt;It generates and sets the "ComparisonStrings" list&lt;/P&gt;&lt;P&gt;it clears selection of source table.&lt;/P&gt;&lt;P&gt;it generates the list of column names&lt;/P&gt;&lt;P&gt;but the looping to select and exclude seems to not do anything.&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="aliegner1_0-1669244333753.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47588iB372043897437950/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_0-1669244333753.png" alt="aliegner1_0-1669244333753.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aliegner1_1-1669245402586.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47589i0EA4A41063C56258/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_1-1669245402586.png" alt="aliegner1_1-1669245402586.png" /&gt;&lt;/span&gt;&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="aliegner1_2-1669245413825.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47590i3AD6BF59C938B4C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_2-1669245413825.png" alt="aliegner1_2-1669245413825.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 23:17:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573058#M78197</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2022-11-23T23:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: select rows of colnames based on value, then exclude those columns in another dt?</title>
      <link>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573075#M78198</link>
      <description>&lt;P&gt;Your JSL is not doing anything that will change the data table you reference as "dt1";&amp;nbsp; If you want to eliminate the rows where the p-values are above .05, it would be a simple matter to add&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 &amp;lt;&amp;lt; select rows(pVals);
dt1 &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;after your "Show( comparisonStrings );"&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 03:18:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-rows-of-colnames-based-on-value-then-exclude-those/m-p/573075#M78198</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-11-24T03:18:44Z</dc:date>
    </item>
  </channel>
</rss>

