par_lapply: Parallelise Lapply
Description
Simple wrapper around lapply and parallel::clusterApplyLB to abstract away
the logic of deciding which one to use.
Usage
par_lapply(cl, fun, x, ...)
Value
list of results of calling fun on elements of x.
Arguments
- cl
(cluster object)
Cluster created by parallel::makeCluster() or NULL
- fun
(functions)
Function to be run
- x
(object)
Object to be looped over
- ...
Extra arguments passed to fun