Learn R Programming

kdry (version 0.0.3)

pch_check_available_cores: pch_check_available_cores

Description

Parallel computing helper function to check for the available cores.

Usage

pch_check_available_cores(ncores = -1L)

Value

The function returns an integer that indicates the number of cores available. If ncores <= parallel::detectCores() the function returns ncores. If ncores > parallel::detectCores(), the function returns parallel::detectCores() - 1L.

Arguments

ncores

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

Examples

Run this code
pch_check_available_cores(2)

Run the code above in your browser using DataLab