TITLE(col @@ Column Indexes)
USAGE(
col(x, as.factor=FALSE)
)
ALIAS(col)
ARGUMENTS(
ARG(x @@ a matrix.)
ARG(as.factor @@ a logical value indicating whether the
value should be returned as a factor rather than as numeric.)
)
VALUE(
An integer matrix with the same dimensions as LANG(x) and whose
LANG(ij)-th element is equal to LANG(j).
)
SEEALSO(
LANG(LINK(row)) to get rows.
)
EXAMPLES(
# extract an off-diagonal of a matrix
ma <- matrix(1:12, 3,4)
ma[row(ma)==col(ma) + 1]
BLANK
# create an identity 5-by-5 matrix
x <- matrix(0,nr=5,nc=5)
x[row(x)==col(x)] <- 1
)
