powered by
Returns the number of parallel workers configured in the current future plan.
get_n_workers()
Integer specifying the number of workers, or 1 if sequential processing is enabled.
set_parallel_plan()
if (FALSE) { set_parallel_plan("multisession", workers = 4) get_n_workers() # Returns 4 set_parallel_plan("sequential") get_n_workers() # Returns 1 }
Run the code above in your browser using DataLab