make_rbmi_cluster | R Documentation |
rbmi
ready clusterCreate a rbmi
ready cluster
make_rbmi_cluster(ncores = 1, objects = NULL, packages = NULL)
ncores |
Number of parallel processes to use or an existing cluster to make use of |
objects |
a named list of objects to export into the sub-processes |
packages |
a character vector of libraries to load in the sub-processes This function is a wrapper around If If |
## Not run:
# Basic usage
make_rbmi_cluster(5)
# User objects + libraries
VALUE <- 5
myfun <- function(x) {
x + day(VALUE) # From lubridate::day()
}
make_rbmi_cluster(5, list(VALUE = VALUE, myfun = myfun), c("lubridate"))
# Using a already created cluster
cl <- parallel::makeCluster(5)
make_rbmi_cluster(cl)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.