Skip to contents

R CMD check --as-cran sets _R_CHECK_LIMIT_CORES_, and under it parallel::mclapply() does not quietly use fewer cores — it errors, via parallel:::.check_ncores(), the moment more than two are asked for. So a default of "cores minus one" turns every jackknife into a failure on any machine with four or more cores, in exactly the context where a package is most likely to be run by someone other than its author.

Usage

core_ceiling()

Value

2L under a core-limited check, otherwise Inf

Details

Capping rather than erroring is right here: the caller asked for a jackknife, not for a particular number of processes, and two workers computes the same answer as eight.