Returns number of rows or number of columns of rectangular input object.

numCols(x)
numRows(x)

Arguments

x

rectangular object.

Value

the number of rows or columns of the input object.

Examples

x <- matrix(1:12, nrow=3)
numCols(x)
#> [1] 4
numRows(x)
#> [1] 3