TITLE(row @@ Row Indexes)
USAGE(
row(x, as.factor=FALSE)
)
ALIAS(row)
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(i).
)
SEEALSO(
LANG(LINK(col)) to get columns.
)
EXAMPLES(
x <- matrix(1:12, 3, 4)
# extract the diagonal of a matrix
dx <- x[row(x)==col(x)]
dx
BLANK
# create an identity 5-by-5 matrix
x <- matrix(0,nr=5,nc=5)
x[row(x)==col(x)] <- 1
x
)
