DELETEROW

Purpose:

Deletes one or more rows from a table.

Syntax:

DELETEROW(series, rows)

series

-

A series or table.

rows

-

A series of integers specifying the rows to remove.

Returns:

A series or table.

Example:

W1: ravel(1..16, 4)

W2: deleterow(W1, {2})

 

W1 contains the table:

 

{{1, 5,  9, 13},

 {2, 6, 10, 14}, 

 {3, 7, 11, 15}, 

 {4, 8, 12, 16}} 

 

W2 contains the table:

 

{{1, 5,  9, 13},

 {3, 7, 11, 15}, 

 {4, 8, 12, 16}} 

Example:

W3: deleterow(W1, {1, 4, 2})

 

W3 contains the single row series {{3, 7, 11, 15}}.

Remarks:

The rows to removed specified by the rows series can be in any order.

 

Values can also be deleted by assigning the empty series. For example:

 

a = ravel(1..16, 4);

a[2, ..] = {}

 

a == {{1, 5, 9,  13},

      {3, 7, 11, 15}, 

      {4, 8, 12, 16}}. 

 

See DELETECOL to delete columns.

See Also:

DECIMATE

DELETE

DELETECOL

EXTRACT

MERGE

RAVEL

REMOVE