apply {matter} | R Documentation |
An implementation of apply
for matter_mat
matrices.
## S4 method for signature 'matter_mat' apply(X, MARGIN, FUN, ...)
X |
A |
MARGIN |
Must be 1 or 2 for |
FUN |
The function to be applied. |
... |
Additional arguments to be passed to |
Because FUN
must be executed by the interpreter in the appropriate R environment, the full row or column will be loaded into memory. The chunksize
of X
is ignored. For summary statistics, functions like colMeans
and rowMeans
offer greater control over memory pressure.
See apply
for details.
Applying a function over the rows of a matter_matc
(column-major) matrix or over the columns of a matter_matr
(row-major) matrix may be very slow.
Kylie A. Bemis
x <- matter(1:100, nrow=10, ncol=10) apply(x, 2, summary)