lapply {matter} | R Documentation |
An implementation of lapply
and sapply
for matter_list
objects.
## S4 method for signature 'matter_list' lapply(X, FUN, ..., BPPARAM = bpparam()) ## S4 method for signature 'matter_list' sapply(X, FUN, ..., BPPARAM = bpparam(), simplify = TRUE, USE.NAMES = TRUE)
X |
A |
FUN |
The function to be applied. |
... |
Additional arguments to be passed to |
simplify |
Should the result be simplified into a vector, matrix, or higher dimensional array? |
USE.NAMES |
Use |
BPPARAM |
An optional instance of |
Because FUN
must be executed by the interpreter in the appropriate R environment, the full list element will be loaded into memory. The chunksize
of X
is ignored. When performed in parallel, the matter
metadata is serialized to each R session, so all workers must be able to access the data via the same paths()
.
See lapply
for details.
Kylie A. Bemis
register(SerialParam()) x <- matter_list(list(1:10, b=11:20, 21:30), names=c("a", "b", "c")) lapply(x, sum) sapply(x, sum)