Description Usage Arguments Details Value
A convenient wrapper around the parallel processing backend from the doParallel package. Simply pass in the expression you'd like to be run in parallel and the result will be returned. Of course, this only helps if the code in 'expr“ is written to take advantage of a parallel backend; good examples of this are training models with 'caret::train“ or custom code making use of the 'parApply' family of functions.
1 | parallelize(expr, num_cores = NULL, run_time = TRUE, ...)
|
expr |
An expression to be evaluated. |
num_cores |
The number of cores to parallelize across. By default the number of available cores minus one (i.e., 'parallel::detectCores() - 1') is used. |
run_time |
Should the time taken to run 'expr' be printed? |
... |
Additional arguments to be passed to [run_time()] |
Once the code has evaluated successfully or crashed the CPU cluster is shut down, ensuring you don't keep requesting additional resources without freeing any up.
The result of evaluating 'expr'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.