Learn R Programming

splus2R (version 1.1-0)

numCols: Object dimensions

Description

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

Usage

numCols(x)
numRows(x)

Arguments

x
rectangular object.

Value

  • the number of rows or columns of the input object.

concept

splus

See Also

as.data.frame,matrix,Subscript,nrow,dimnames.

Examples

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

Run the code above in your browser using DataLab