Function to set automatically or manually the number of cores It sets automatically the numbers of core as follows : nb_of_cores available - 2 To change manually you need to call it and put the

setCores(n = NULL)

Arguments

n

The number of cores to use. If NULL (default), automatically sets to total_cores - 2 (minimum 1). If specified, must be at least 1 and will be capped by the maximum which will be at the total number of available cores.

Value

Number of cores set (invisible)

Examples

#Automatic setting setCores()
#Manual setting to 4 cores : setCores(4)