To delete rows, send a Delete Rows message and specify which row or rows to delete. To delete more than one row, give a list or matrix as the rownum argument, or combine Delete Rows with other commands such as For. The rownum argument can be a number, list of numbers, range of numbers, matrix, or an expression that yields one of these. Without an argument, Delete Rows returns the number of selected rows and deletes those rows. When an argument is not specified or rows are not selected, Delete Rows only returns the number of selected rows: 0.
dt << Delete Rows( 10 ); // delete row 10
dt << Delete Rows( {11, 12, 13} ); // delete rows 11-13
myList = {11, 12, 13};
dt << Delete Rows( mylist ); // delete rows 11-13
dt << Delete Rows( 1 :: 20 ); // delete first 20 rows
dt << Delete Rows( [1 2 3] );  // delete first 3 rows
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Selected( Row State( 10 ) ) = 1; // select row 10
dt << Delete Rows;  // delete row 10
Here is a general way to remove the bottom x rows of a data table of any size. The following example removes five rows from the bottom of the data table:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
x = 5;
n = N Row( dt );
For( i = n, i > n - x, i--,
	dt << Delete Rows( i )
);
NRow counts the rows in the table. For more details, see Iterate a Script on Each Row.

Help created on 10/11/2018