setCluster function

Define a parallel cluster object to be used in internal functions

Define a parallel cluster object to be used in internal functions

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 designs, for example) it is not recommended to define a cluster.

setCluster(spec, ..., remove = FALSE)

Arguments

  • spec: input that is passed to parallel::makeCluster(). If no input is given the maximum number of available local cores will be used
  • ...: additional arguments to pass to parallel::makeCluster
  • remove: logical; remove previously defined cluster object?

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)

References

Chalmers, R. P. & Flora, D. B. (2015). faoutlier: An R Package for Detecting Influential Cases in Exploratory and Confirmatory Factor Analysis. Applied Psychological Measurement, 39, 573-574. tools:::Rd_expr_doi("10.1177/0146621615597894")

Flora, D. B., LaBrish, C. & Chalmers, R. P. (2012). Old and new ideas for data screening and assumption testing for exploratory and confirmatory factor analysis. Frontiers in Psychology, 3, 1-21. tools:::Rd_expr_doi("10.3389/fpsyg.2012.00055")

Author(s)

Phil Chalmers rphilip.chalmers@gmail.com