nrow(x) ncol(x) NCOL(x) NROW(x)
x
| array or data.frame |
nrow and ncol return the number of rows or columns present in x.
NCOL and NROW do the same, but treat a vector as 1-column matrix.
dim which returns all dimensions;
array, matrix.