<?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: Deleting specified rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Deleting-specified-rows/m-p/217319#M43446</link>
    <description>&lt;P&gt;This worked, thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jul 2019 16:42:35 GMT</pubDate>
    <dc:creator>kcorder</dc:creator>
    <dc:date>2019-07-12T16:42:35Z</dc:date>
    <item>
      <title>Deleting specified rows</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-specified-rows/m-p/217295#M43440</link>
      <description>&lt;P&gt;Hey JMP community, I am extremely new to jmp/jsl (literally just started this week). I have a script that is supposed to select where certain values in a row are less than 3, and then delete those rows. This is the script I have to do so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select where( :Residual 1 &amp;lt;= 3 );
dt &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code correctly selects the rows I want it to, but upon deleting the rows they "update" themselves (I have a neural network model scripted into the lines before it... see below code).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// 1. Creates X1 column, and corresponding Y1 and Ystat columns
Close All( Data Tables, NoSave );
dt = New Table( "SampleRun 3",
	Add Rows( 100 ),
	New Script(
		"Ystat vs. X1",
		Graph Builder(
			Variables( X( :X1 ), Y( :Ystat ) ),
			Elements( Points( X, Y, Legend( 5 ) ) )
		)
	),
	New Column( "X1", 
		Formula( Random Integer( 50 ) )
	),
	New Column( "Y1", 
		Formula( If( :X1 &amp;lt; 25, 2 * :X1, 25 &amp;lt;= :X1 &amp;lt;= 30, 3 * :X1, 4 * :X1 ) )
	),
	New Column( "Ystat", 
		Formula( :Y1 )
	)
);
// 2. Creates predicted Ystat column, saves formulas into same data table (first iteration)
PredictedYstat = dt &amp;lt;&amp;lt; Neural(
	Y( :Ystat ),
	X( :X1 ),
	Informative Missing( 0 ),
	Validation Method( "Holdback", 0.3333 ),
	Fit( NTanH( 3 ) )
);
PredictedYStat &amp;lt;&amp;lt; Save Profile Formulas;

// 3. Adds residual column
dt &amp;lt;&amp;lt; New Column( "Residual 1", Formula( Abs( :Predicted Ystat - :Ystat ) ) );
dt &amp;lt;&amp;lt; select where( :Residual 1 &amp;gt;= 3 );
dt &amp;lt;&amp;lt; delete rows;&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;I am able to select these rows and put them into a new table, but that is a last resort as it is inefficient. Any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kyle&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 16:29:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-specified-rows/m-p/217295#M43440</guid>
      <dc:creator>kcorder</dc:creator>
      <dc:date>2019-07-12T16:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting specified rows</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-specified-rows/m-p/217309#M43443</link>
      <description>&lt;P&gt;If you want the Formulas to evaluate once and only once, one option would be to force the computation and then delete the formulas:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Run Formulas;
Column(dt, "X1") &amp;lt;&amp;lt; Delete Formula;
Column(dt, "Y1") &amp;lt;&amp;lt; Delete Formula;
Column(dt, "Ystat") &amp;lt;&amp;lt; Delete Formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2019 15:13:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-specified-rows/m-p/217309#M43443</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2019-07-12T15:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting specified rows</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-specified-rows/m-p/217319#M43446</link>
      <description>&lt;P&gt;This worked, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 16:42:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-specified-rows/m-p/217319#M43446</guid>
      <dc:creator>kcorder</dc:creator>
      <dc:date>2019-07-12T16:42:35Z</dc:date>
    </item>
  </channel>
</rss>

