<?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: remove filter using script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1227#M1227</link>
    <description>I am having the same issue as Khill, I am trying to run the same contingency analysis for many different year combinations. &lt;BR /&gt;&lt;BR /&gt;Here is the script that I am working on. The script runs well for the first year combination (2006, 2007). Then when I clear the selected rows and try filtering again for the next year combination (2006,2008), the filter doesn't get set, and I get a contingency analysis for all the years of data. I think I am missing something basic. &lt;BR /&gt;&lt;BR /&gt;Please help, I am new to JMP and scripting, but I am enjoying the puzzle. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;dt = Open("D:\T_drive\M03-SISP2-Mon\2010-SISP2-GridMon\ZPP\S_sox_0607080910_Merge.jmp")&lt;BR /&gt;&amp;lt;&amp;lt; Data Filter(&lt;BR /&gt;	Location( {849, 180} ),&lt;BR /&gt;	Add Filter( columns( :Year_ ), Where( :Year_ == {2006, 2007} ) ),&lt;BR /&gt;	Mode( Include( 1 ) )&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;Contingency(&lt;BR /&gt;	Y( :LT5m ),&lt;BR /&gt;	X( :Year_ ),&lt;BR /&gt;	Contingency Table(&lt;BR /&gt;		Count( 1 ),&lt;BR /&gt;		Total %( 1 ),&lt;BR /&gt;		Col %( 1 ),&lt;BR /&gt;		Row %( 1 ),&lt;BR /&gt;		Expected( 0 ),&lt;BR /&gt;		Deviation( 0 ),&lt;BR /&gt;		Cell Chi Square( 0 ),&lt;BR /&gt;		Col Cum( 0 ),&lt;BR /&gt;		Col Cum %( 0 ),&lt;BR /&gt;		Row Cum( 0 ),&lt;BR /&gt;		Row Cum %( 0 )&lt;BR /&gt;	)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;	dt &amp;lt;&lt;CLEAR&gt;&lt;/CLEAR&gt;&lt;BR /&gt;Current Data Table() &amp;lt;&amp;lt; Data Filter(&lt;BR /&gt;	Location( {849, 180} ),&lt;BR /&gt;	Add Filter( columns( :Year_ ), Where( :Year_ == {2006, 2008} ) ),&lt;BR /&gt;	Mode( Include( 1 ) )&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;Contingency(&lt;BR /&gt;	Y( :LT5m ),&lt;BR /&gt;	X( :Year_ ),&lt;BR /&gt;	Contingency Table(&lt;BR /&gt;		Count( 1 ),&lt;BR /&gt;		Total %( 1 ),&lt;BR /&gt;		Col %( 1 ),&lt;BR /&gt;		Row %( 1 ),&lt;BR /&gt;		Expected( 0 ),&lt;BR /&gt;		Deviation( 0 ),&lt;BR /&gt;		Cell Chi Square( 0 ),&lt;BR /&gt;		Col Cum( 0 ),&lt;BR /&gt;		Col Cum %( 0 ),&lt;BR /&gt;		Row Cum( 0 ),&lt;BR /&gt;		Row Cum %( 0 )&lt;BR /&gt;	)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;	dt &amp;lt;&lt;CLEAR&gt;&lt;/CLEAR&gt;&lt;BR /&gt;Current Data Table() &amp;lt;&amp;lt; Data Filter(&lt;BR /&gt;	Location( {849, 180} ),&lt;BR /&gt;	Add Filter( columns( :Year_ ), Where( :Year_ == {2006, 2009} ) ),&lt;BR /&gt;	Mode( Include( 1 ) )&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;Contingency(&lt;BR /&gt;	Y( :LT5m ),&lt;BR /&gt;	X( :Year_ ),&lt;BR /&gt;	Contingency Table(&lt;BR /&gt;		Count( 1 ),&lt;BR /&gt;		Total %( 1 ),&lt;BR /&gt;		Col %( 1 ),&lt;BR /&gt;		Row %( 1 ),&lt;BR /&gt;		Expected( 0 ),&lt;BR /&gt;		Deviation( 0 ),&lt;BR /&gt;		Cell Chi Square( 0 ),&lt;BR /&gt;		Col Cum( 0 ),&lt;BR /&gt;		Col Cum %( 0 ),&lt;BR /&gt;		Row Cum( 0 ),&lt;BR /&gt;		Row Cum %( 0 )&lt;BR /&gt;	)&lt;BR /&gt;);</description>
    <pubDate>Tue, 22 Mar 2011 17:40:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-22T17:40:12Z</dc:date>
    <item>
      <title>remove filter using script</title>
      <link>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1223#M1223</link>
      <description>I have used script to apply filters in order to run frequencies on the dependent data, but haven't figured out how to remove all filters using script -- what are my options?&lt;BR /&gt;&lt;BR /&gt;For example, here's my applying filter script:&lt;BR /&gt;&lt;BR /&gt;Current Data Table() &amp;lt;&amp;lt; Data Filter(&lt;BR /&gt;	Add Filter(&lt;BR /&gt;		columns( :key ),&lt;BR /&gt;		Where( :key == {1, 3, 4, 5, 6, 888, 999} ),&lt;BR /&gt;		Display( :admit.type, Size( 204, 140 ), List Display )&lt;BR /&gt;	),&lt;BR /&gt;	Mode( Show( 1 ), Include( 1 ) )&lt;BR /&gt;);&lt;BR /&gt;Distribution(&lt;BR /&gt;	Nominal Distribution( Column( :admit.type.other ) ),&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;After I've run this, what script do I use in order to remove the filter?&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Thu, 21 Jan 2010 19:38:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1223#M1223</guid>
      <dc:creator />
      <dc:date>2010-01-21T19:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: remove filter using script</title>
      <link>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1224#M1224</link>
      <description>it just came to me:&lt;BR /&gt;&lt;BR /&gt;Current Data Table() &amp;lt;&amp;lt; Clear Row States;</description>
      <pubDate>Thu, 21 Jan 2010 23:54:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1224#M1224</guid>
      <dc:creator />
      <dc:date>2010-01-21T23:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: remove filter using script</title>
      <link>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1225#M1225</link>
      <description>I see this resets the row states in the data table, but I can't see how to add new filters to the existing fillter. &lt;BR /&gt;&lt;BR /&gt;Simply running a new Add Filter doesn't seem to work, I must be missing something.&lt;BR /&gt;&lt;BR /&gt;My objective is to apply one filter and create a subset for charting. Then clear the existing filter, apply a different filter and create a second subset.</description>
      <pubDate>Mon, 01 Feb 2010 22:07:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1225#M1225</guid>
      <dc:creator>khill</dc:creator>
      <dc:date>2010-02-01T22:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: remove filter using script</title>
      <link>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1226#M1226</link>
      <description>Here's an example that might help. I still cannot make the filter window go away after I'm done via scripting. Must be a way though. The following script assumes that the Fitness data is current.&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Feb 2010 22:59:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1226#M1226</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-02-01T22:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: remove filter using script</title>
      <link>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1227#M1227</link>
      <description>I am having the same issue as Khill, I am trying to run the same contingency analysis for many different year combinations. &lt;BR /&gt;&lt;BR /&gt;Here is the script that I am working on. The script runs well for the first year combination (2006, 2007). Then when I clear the selected rows and try filtering again for the next year combination (2006,2008), the filter doesn't get set, and I get a contingency analysis for all the years of data. I think I am missing something basic. &lt;BR /&gt;&lt;BR /&gt;Please help, I am new to JMP and scripting, but I am enjoying the puzzle. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;dt = Open("D:\T_drive\M03-SISP2-Mon\2010-SISP2-GridMon\ZPP\S_sox_0607080910_Merge.jmp")&lt;BR /&gt;&amp;lt;&amp;lt; Data Filter(&lt;BR /&gt;	Location( {849, 180} ),&lt;BR /&gt;	Add Filter( columns( :Year_ ), Where( :Year_ == {2006, 2007} ) ),&lt;BR /&gt;	Mode( Include( 1 ) )&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;Contingency(&lt;BR /&gt;	Y( :LT5m ),&lt;BR /&gt;	X( :Year_ ),&lt;BR /&gt;	Contingency Table(&lt;BR /&gt;		Count( 1 ),&lt;BR /&gt;		Total %( 1 ),&lt;BR /&gt;		Col %( 1 ),&lt;BR /&gt;		Row %( 1 ),&lt;BR /&gt;		Expected( 0 ),&lt;BR /&gt;		Deviation( 0 ),&lt;BR /&gt;		Cell Chi Square( 0 ),&lt;BR /&gt;		Col Cum( 0 ),&lt;BR /&gt;		Col Cum %( 0 ),&lt;BR /&gt;		Row Cum( 0 ),&lt;BR /&gt;		Row Cum %( 0 )&lt;BR /&gt;	)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;	dt &amp;lt;&lt;CLEAR&gt;&lt;/CLEAR&gt;&lt;BR /&gt;Current Data Table() &amp;lt;&amp;lt; Data Filter(&lt;BR /&gt;	Location( {849, 180} ),&lt;BR /&gt;	Add Filter( columns( :Year_ ), Where( :Year_ == {2006, 2008} ) ),&lt;BR /&gt;	Mode( Include( 1 ) )&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;Contingency(&lt;BR /&gt;	Y( :LT5m ),&lt;BR /&gt;	X( :Year_ ),&lt;BR /&gt;	Contingency Table(&lt;BR /&gt;		Count( 1 ),&lt;BR /&gt;		Total %( 1 ),&lt;BR /&gt;		Col %( 1 ),&lt;BR /&gt;		Row %( 1 ),&lt;BR /&gt;		Expected( 0 ),&lt;BR /&gt;		Deviation( 0 ),&lt;BR /&gt;		Cell Chi Square( 0 ),&lt;BR /&gt;		Col Cum( 0 ),&lt;BR /&gt;		Col Cum %( 0 ),&lt;BR /&gt;		Row Cum( 0 ),&lt;BR /&gt;		Row Cum %( 0 )&lt;BR /&gt;	)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;	dt &amp;lt;&lt;CLEAR&gt;&lt;/CLEAR&gt;&lt;BR /&gt;Current Data Table() &amp;lt;&amp;lt; Data Filter(&lt;BR /&gt;	Location( {849, 180} ),&lt;BR /&gt;	Add Filter( columns( :Year_ ), Where( :Year_ == {2006, 2009} ) ),&lt;BR /&gt;	Mode( Include( 1 ) )&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;Contingency(&lt;BR /&gt;	Y( :LT5m ),&lt;BR /&gt;	X( :Year_ ),&lt;BR /&gt;	Contingency Table(&lt;BR /&gt;		Count( 1 ),&lt;BR /&gt;		Total %( 1 ),&lt;BR /&gt;		Col %( 1 ),&lt;BR /&gt;		Row %( 1 ),&lt;BR /&gt;		Expected( 0 ),&lt;BR /&gt;		Deviation( 0 ),&lt;BR /&gt;		Cell Chi Square( 0 ),&lt;BR /&gt;		Col Cum( 0 ),&lt;BR /&gt;		Col Cum %( 0 ),&lt;BR /&gt;		Row Cum( 0 ),&lt;BR /&gt;		Row Cum %( 0 )&lt;BR /&gt;	)&lt;BR /&gt;);</description>
      <pubDate>Tue, 22 Mar 2011 17:40:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1227#M1227</guid>
      <dc:creator />
      <dc:date>2011-03-22T17:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: remove filter using script</title>
      <link>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1228#M1228</link>
      <description>Try this - &lt;BR /&gt;&lt;BR /&gt;df = Current Data Table() &amp;lt;&amp;lt; Data Filter( Add Filter( columns( :age, :sex, :height ) ));&lt;BR /&gt;&lt;BR /&gt;df &amp;lt;&amp;lt; delete(:age);&lt;BR /&gt;&lt;BR /&gt;df &amp;lt;&amp;lt; delete all;&lt;BR /&gt;&lt;BR /&gt;df &amp;lt;&amp;lt; close window;</description>
      <pubDate>Mon, 28 Mar 2011 12:32:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-filter-using-script/m-p/1228#M1228</guid>
      <dc:creator>chungwei</dc:creator>
      <dc:date>2011-03-28T12:32:45Z</dc:date>
    </item>
  </channel>
</rss>

