powered by
Opens a parallel cluster for computation, registers it for parallel operations, and ensures its closure on script exit.
openCluster(cluster.type = "SOCK", np = 2, progBar = TRUE, debugging = FALSE)
An object representing the parallel cluster.
A character string specifying the type of cluster. Accepted values are "SOCK", "FORK", or "MPI".
An integer specifying the number of processes to be used in the parallel cluster.
logical. If TRUE a progress bar is shown.
logical. For developer use.
if (FALSE) { # Open a SOCK cluster with 4 cores cls <- openCluster("SOCK", 4) # Your parallel computation code here # The cluster will automatically close when the script exits }
Run the code above in your browser using DataLab