Learn R Programming

dclone (version 2.1-1)

evalParallelArgument: Evaluates parallel argument

Description

Evaluates parallel argument.

Usage

evalParallelArgument(cl, quit = FALSE)

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).

Value

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

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