| bplapply {BiocParallel} | R Documentation |
bplapply applies FUN to each element of X. Any
type of object X is allowed, provided length, [,
and [[ methods are available. The return value is a list
of length equal to X, as with lapply.
bplapply(X, FUN, ..., BPREDO = list(), BPPARAM=bpparam())
X |
Any object for which methods |
FUN |
The |
... |
Additional arguments for |
BPPARAM |
An optional |
BPREDO |
A |
See showMethods{bplapply} for additional methods, e.g.,
method?bplapply("MulticoreParam").
See lapply.
Martin Morgan mailto:mtmorgan@fhcrc.org. Original code as
attributed in mclapply.
bpvec for parallel, vectorized calculations.
BiocParallelParam for possible values of BPPARAM.
showMethods("bplapply")
## ten tasks (1:10) so ten calls to FUN default registered parallel
## back-end. Compare with bpvec.
fun <- function(v) {
message("working") ## 10 tasks
sqrt(v)
}
bplapply(1:10, fun)