View source: R/sapply_by_ncores.R
If ncores==1
, use sapply
, else use parallel::parSapply
.
1 | sapply_by_ncores(ncores, X, FUN, cl = NULL)
|
ncores |
Integer. If > 1, number of cores to use for parallel computing.
You can detect how many are available for your system using |
X |
a vector (atomic or list) or an |
FUN |
the function to be applied to each element of |
cl |
Cluster object, created by parallel or by package |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.