cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
ChrisNally
Level II

Looking to delete set number of rows

Good Morning

                         Using JmP for process control and capability. Would like to be able to select only the last 20 rows (ongoing) of a table and exclude the rest, as now running to several hundred rows; the early data somewhat skewing the capability analysis due to process changes. Any help would be much appreciated, thanks.

 

Chris

3 REPLIES 3
txnelson
Super User

Re: Looking to delete set number of rows

Might this be what you want?

Names Default To Here( 1 );
dt = Open("$SAMPLE_DATA/big class.jmp");

ex = dt << select where( Row() < N Rows( dt ) - 20 );
ex << exclude << hide;

Control Chart( Group Size( 1 ), KSigma( 3 ),
	Chart Col( :height, Individual Measurement, Moving Range ) );
Jim
ChrisNally
Level II

Re: Looking to delete set number of rows

Thank you, this works perfectly, much aapreciated.

 

Chris

Byron_JMP
Staff

Re: Looking to delete set number of rows

Another way to do this...

 

To set up the script, run the analysis the way you want, whether its in distribution, with a control chart, capability, or process screening. Then add a local data filter to look at the date or row range you want, e.g. the last 50 rows or something.  

 

Then find this like in the script:

	Local Data Filter(
		Add Filter( columns( :Row ), Where( :Row >= 15 & :Row <= 20 ) )
	),

and edit it to look like this:

	Local Data Filter(
		Add Filter( columns( :Row ), Where( :Row = nrow()-5 & :Row = nrow() ) )
	),

In the first script the report uses row 15 to 20.  

the report uses the last 5 rows regardless of how many rows there are.* 

 

 

*... and yes, I konw 5 rows are two few for a good capability report, this just an example

 

JMP Systems Engineer, Health and Life Sciences (Pharma)