cleanMclapply | R Documentation |
A function to break an mclapply into parts, save to disk and run independently
cleanMclapply( x, applyFunc, ..., mc.cores = parallel::detectCores(), extraCode = "", nSplits = mc.cores, VOCAL = TRUE, envir = .GlobalEnv )
x |
vector/list to apply over |
applyFunc |
function to apply |
... |
arguments for mclapply |
mc.cores |
number of cores to use |
extraCode |
character vector of setup code (each command self-contained within a cell or concatenated with ;) |
nSplits |
number of splits to make (if > mc.cores then R will restart more frequently and load less data at once) |
VOCAL |
if TRUE then output status information |
envir |
environment to look for variables in |
the concatenated outputs from applyFunc cleanMclapply(1:10,2,sqrt) cleanMclapply(1:10,2,function(x,y)x^y,y=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.