setCluster: Define a parallel cluster object to be used in internal...

View source: R/setClusters.R

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

Usage

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?

Author(s)

Phil Chalmers rphilip.chalmers@gmail.com

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. \Sexpr[results=rd]{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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3389/fpsyg.2012.00055")}

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)

philchalmers/faoutlier documentation built on Aug. 22, 2023, 8:55 p.m.