Learn R Programming

dclone (version 2.3-2)

evalParallelArgument: Evaluates parallel argument

Description

Evaluates parallel argument.

Usage

evalParallelArgument(cl, quit = FALSE)

Value

NULL for sequential evaluation or the original value of cl if parallel evaluation is meaningful.

Arguments

cl

NULL, a cluster object or an integer. Can be missing.

quit

Logical, whether it should stop with error when ambiguous parallel definition is found (conflicting default environmental variable settings).

Author

Peter Solymos, solymos@ualberta.ca

Examples

Run this code
evalParallelArgument()
evalParallelArgument(NULL)
evalParallelArgument(1)
evalParallelArgument(2)
cl <- makePSOCKcluster(2)
evalParallelArgument(cl)
stopCluster(cl)
oop <- options("mc.cores"=2)
evalParallelArgument()
options(oop)

Run the code above in your browser using DataLab