powered by
nrow
ncol
x
NCOL
NROW
nrow(x) ncol(x) NCOL(x) NROW(x)
integer
NULL
dim
array
matrix
ma <- matrix(1:12, 3, 4) nrow(ma) # 3 ncol(ma) # 4 ncol(array(1:24, dim = 2:4)) # 3, the second dimension NCOL(1:12) # 1 NROW(1:12) # 12
Run the code above in your browser using DataLab