Learn R Programming

kdry (version 0.0.3)

pch_register_parallel: pch_register_parallel

Description

Parallel computing helper function to register a parallel backend.

Usage

pch_register_parallel(ncores)

Value

The function returns a object of class c("SOCKcluster", "cluster"), created with parallel::makePSOCKcluster().

Arguments

ncores

An integer. A number of cores requested for parallel computing (default: -1L).

See Also

parallel::makePSOCKcluster(), doParallel::registerDoParallel()

Examples

Run this code
if (require("doParallel") && require("foreach")) {
  cl <- pch_register_parallel(pch_check_available_cores(2))
  pch_clean_up(cl)
}

Run the code above in your browser using DataLab