Learn R Programming

ecodive (version 2.2.2)

n_cpus: Number of CPU Cores

Description

A thin wrapper around parallely::availableCores(). If the parallely package is not installed, then it falls back to parallel::detectCores(all.tests = TRUE, logical = TRUE). Returns 1 if pthread support is unavailable or when the number of cpus cannot be determined.

Usage

n_cpus()

Arguments

Value

A scalar integer, guaranteed to be at least 1.

Examples

Run this code
    n_cpus()

Run the code above in your browser using DataLab