Last data update: 2014.03.03

R: Define a parallel cluster object to be used in internal...
setClusterR Documentation

Define a parallel cluster object to be used in internal functions

Description

This function defines a object that is placed in a relevant internal environment defined in faoutlier. Internal functions will utilize this object automatically to capitalize on parallel processing architecture. The object defined is a call from parallel::makeCluster(). Note that if you are defining other parallel objects (for simulation desings, for example) it is not recommended to define a cluster.

Usage

setCluster(ncores, remove = FALSE)

Arguments

ncores

number of cores to be used in the returned object which is passed to parallel::makeCluster(). If no input is given the maximum number of available cores will be used

remove

logical; remove previously defined cluster object?

Author(s)

Phil Chalmers rphilip.chalmers@gmail.com

Examples


## Not run: 

#make 4 cores available for parallel computing
setCluster(4)

#' #stop and remove cores
setCluster(remove = TRUE)

#use all available cores
setCluster()


## End(Not run)

Results