Skip to contents

Set the number of parallel threads to use. prego uses the R function doMC::registerDoMC to register the parallelization. By default, prego uses 80% of the number of available cores. The options are saved under 'prego.parallel' (should we use parallelization, logical) and 'prego.parallel.nc' (number of cores to use, integer).

Usage

set_parallel(thread_num = max(1, round(parallel::detectCores() * 0.8)))

Arguments

thread_num

number of threads. use '1' for non parallel behavior

Value

None

Examples

# \donttest{
set_parallel(8)
# }