Learn R Programming

splus2R (version 1.3-5)

numCols: Object dimensions

Description

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

Usage

numCols(x)
numRows(x)

Value

the number of rows or columns of the input object.

Arguments

x

rectangular object.

See Also

Examples

Run this code
x <- matrix(1:12, nrow=3)
numCols(x)
numRows(x)

Run the code above in your browser using DataLab