apply(x, 1,
FUN, ...)
(row apply) and apply(x, 2, FUN, ...)
(column apply). Intended for use with 2D R matrix
s.
We do a bit more work to ensure row names, column names are
passed along if appropriate.
rowApply(X, FUN, ..., drop = TRUE)
colApply(X, FUN, ..., drop = TRUE)
FUN
.TRUE
, we 'drop' dimensions
so that results of dimension n x 1
or 1 x n
are coerced to vectors.apply
for more info.