rows
Syntax
rows(X)
Arguments
X is a vector/matrix/table.
Details
Return the number of rows in X. Please check related function: cols.
Examples
$ y=1 2 3;
$ rows(y);
3
// a vector can be viewed as an n*1 matrix.
$ x=1..6$2:3;
$ X
#0 |
#1 |
#2 |
---|---|---|
1 |
3 |
5 |
2 |
4 |
6 |
$ rows X
2
$ a=table(1..3 as x,`IBM`C`AAPL as y);
$ a
x |
y |
---|---|
1 |
IBM |
2 |
C |
3 |
AAPL |
$ rows a;
3