<?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: Filtering row values that are not within a given range (JSL) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209028#M41984</link>
    <description>&lt;P&gt;Thanks, this is what I was looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this message in my table, though:&amp;nbsp;Attempt to assign to a locked column &lt;EM&gt;mycol&lt;/EM&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2019 10:55:01 GMT</pubDate>
    <dc:creator>FN</dc:creator>
    <dc:date>2019-05-20T10:55:01Z</dc:date>
    <item>
      <title>Filtering row values that are not within a given range (JSL)</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209000#M41976</link>
      <description>&lt;P&gt;I am trying to automate some data cleaning. I have lower and high limit values that are considered valid per column and I want to remove verything else having at the end empty values instead. I am missing:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;How to clear row values once there is a selection.&lt;/LI&gt;&lt;LI&gt;How to reference a column name&lt;/LI&gt;&lt;LI&gt;If there is a better way to do it.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Current Data Table();

lower_limit = 69.636;
higher_limit = 71.482;

sel = dt &amp;lt;&amp;lt; Select Where( :my_column_name&amp;gt;= lower_limit &amp;amp;
	 :my_column_name&amp;lt;= higher_limit  );
	 
sel &amp;lt;&amp;lt;  Invert Row Selection;

// clear rows (sel)??



/*
// Here I am trying to do the same but referencing the column. Yet it does not work.
mycol = Column("my_column_name"); // this does not work
mycol = :my_column_name; //  this does not work either

sel = dt &amp;lt;&amp;lt; Select Where( mycol &amp;gt;= lower_limit &amp;amp;
	 mycol &amp;lt;= higher_limit  );

*/
	 
	 &lt;/CODE&gt;&lt;/PRE&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>Mon, 20 May 2019 09:45:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209000#M41976</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2019-05-20T09:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering row values that are not within a given range (JSL)</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209021#M41979</link>
      <description>&lt;P&gt;You should look up the Function As Column(). If you want to use column values, the syntax is ref_name[], that is, left bracket, right bracket.&amp;nbsp; Try the syntax below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;sel = dt &amp;lt;&amp;lt; Select Where( mycol[] &amp;gt;= lower_limit &amp;amp;
	 mycol[] &amp;lt;= higher_limit  );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 May 2019 10:14:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209021#M41979</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-05-20T10:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering row values that are not within a given range (JSL)</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209024#M41980</link>
      <description>&lt;P&gt;Excellent, how can I then remove the values of that specific selection (rows and column)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 10:23:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209024#M41980</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2019-05-20T10:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering row values that are not within a given range (JSL)</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209026#M41982</link>
      <description>&lt;P&gt;Did you wnat to replace the values in that column to empty, or do you wnat to delete the rows?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open("$sample_data/big class.jmp");

lower_limit = 70;
higher_limit = 150;
mycol = Column("weight");

sel = dt &amp;lt;&amp;lt; Get Rows Where ( mycol[] &amp;lt; lower_limit |
	 mycol[] &amp;gt; higher_limit  );
	 
mycol[sel]= empty();

//to delete rows use
// dt &amp;lt;&amp;lt; delete rows(sel);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 May 2019 10:34:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209026#M41982</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-05-20T10:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering row values that are not within a given range (JSL)</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209028#M41984</link>
      <description>&lt;P&gt;Thanks, this is what I was looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this message in my table, though:&amp;nbsp;Attempt to assign to a locked column &lt;EM&gt;mycol&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 10:55:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-row-values-that-are-not-within-a-given-range-JSL/m-p/209028#M41984</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2019-05-20T10:55:01Z</dc:date>
    </item>
  </channel>
</rss>

