run_parallel | R Documentation |
A wrap function to run parallel in different platforms
run_parallel(x, fun, cpus = parallel::detectCores() - 1, ...)
x |
A numeric vector for parallel |
fun |
A function |
cpus |
Number of CPUs for snowfall package |
... |
Other arguments passed to fun |
The supported platforms include * local computer through snowfall package (default) * MPI cluster through snow package * Windows HPC pack for parameter sweep job
Result of parallel function.
## Not run:
fun <- function(i, a) {
return(i * a)
}
run_parallel(seq(1, 10), fun, a = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.