row
Syntax
row(X, a)
Arguments
X is a vector/matrix/table.
a is a nonnegative integer.
Details
Return a row of a vector/matrix/table.
Examples
$ x=matrix(1 2 3, 4 5 6);
$ x;
#0 |
#1 |
---|---|
1 |
4 |
2 |
5 |
3 |
6 |
$ row(x,1);
[2,5]
$ row(x,0);
[1,4]
$ x.row(2);
[3,6]
$ a=table(1..3 as x,`IBM`C`AAPL as y);
$ a
x |
y |
---|---|
1 |
IBM |
2 |
C |
3 |
AAPL |
$ row(a,1);
y->C
x->2
Related function: col