par_lapply | R Documentation |
This is a generic parallel lapply that work across all major platforms.
par_lapply(
lst,
fun,
cores = NULL,
parallel = TRUE,
win_init = expression({ requireNamespace("ctmm", quietly = TRUE) })
)
lst |
Input list. |
fun |
Function to be applied on |
cores |
the core count to be used for cluster. Could be a positive integer or
|
parallel |
Use regular |
win_init |
Expression to be initialized in Windows. Since all parameters
should be included in the input list already, this usually means library
calls, like |
In Windows parallel::parLapplyLB()
is used, which is a socket cluster and
need to initialize each session manually with win_init
if needed. In
Linux/Mac parallel::mclapply()
is used, where each worker will inherit the
current environment through forking, so no additional setup is required.
List of applied results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.