Extracts multiple rows from a table.
GETROW(a, rownums)
a |
- |
A series or table. |
rownums |
- |
An integer. A series of row indices to extract. |
A row series.
W1: {{1, 4, 6},
{2, 5, 7},
{3, 6, 8}}
W2: getrow(W1, {2})
returns {{2, 5, 7}}
W3: {{1, 4, 6},
{2, 5, 7},
{3, 6, 8}}
W4: W1[2, ..]
W4 == {{2, 5, 7}}
Same as above, except array indexing is used to obtain the 2nd row.
W1: {{1, 4, 6},
{2, 5, 7},
{3, 6, 8}}
W2: getrow(W1, {1, 2, 1})
W2 == {{1, 4, 6},
{2, 5, 7},
{1, 4, 6}}
W2 contains row 1, row 2 and row 1 of W1.
W3: {{1, 4, 6},
{2, 5, 7},
{3, 6, 8}}
W4: W1[{1, 2, 1}, ..]
W4 == {{1, 4, 6},
{2, 5, 7},
{1, 4, 6}}
Same as above, except array indexing is used to obtain the rows.
GETROW is similar to ROW except a series of indices are specified to extract multiple rows in any order.
See GETCOLUMN to extract multiple columns.
See .. (Range Specifier) for more example of the array syntax method for extracting one or more rows and/or columns.