jubilee.mcsapply {jubilee} | R Documentation |
Wrapper to calculate sapply
using multi-core
Description
This utility calculates sapply
using multi-core capability.
It is a simple wrapper on simplify2array
and parallel::mclapply
.
It is particularly convenient on Linux and Mac when parallelism saves significant amount of computing time.
Usage
jubilee.mcsapply(x, FUN, ...)
Arguments
x |
numeric |
FUN |
the function to be applied to each element of x |
... |
optional arguments to |
Value
numeric
Author(s)
Stephen H. Lihn
Examples
a <- seq(1,100)
jubilee.mcsapply(a, function(x) x^2) # use multi-core!
[Package jubilee version 0.3.3 Index]