Learn R Programming

rmoo (version 0.3.2)

startParallel: Start Parallel Backend for rmoo Package

Description

This function sets up parallel computing using the parallel and doParallel packages. It supports both "snow" (PSOCK) and "multicore" backends depending on the OS.

Usage

startParallel(parallel = TRUE, ...)

Value

An object of class logical with attributes:

  • type: cluster type ("snow" or "multicore")

  • cores: number of cores used

  • cluster: the cluster object created or passed

Arguments

parallel

Logical, numeric, character, or a cluster object. If TRUE, uses all detected cores. If numeric, it specifies the number of cores. If character, should be "snow" or "multicore". If a cluster object, it will use that cluster.

...

Additional arguments (currently unused).

Examples

Run this code
if (FALSE) {
  cl <- startParallel(TRUE)
  stopParallel(attr(cl, "cluster"))
}

Run the code above in your browser using DataLab