Extents of a Matrix

DESCRIPTION:
Gives the number of rows or the number of columns of a matrix.

USAGE:
ncol(x)
nrow(x)

REQUIRED ARGUMENTS:
x:
matrix. Missing values (NAs) are allowed.

VALUE:
ncol returns the number of columns in x.

nrow returns the number of rows in x.


DETAILS:
These functions are generic in the sense that they are based on the dim function which is generic.

SEE ALSO:
col , dim , length .

EXAMPLES:
ncol(freeny.x)

# create a matrix of 0's the same size as freeny.x x <- matrix(numeric(length(freeny.x)), nrow = nrow(freeny.x))