Skip to contents

Set and end parallel computation

Usage

parallel_set(num_cores = 10, cluster_type = "fork")

parallel_end()

Arguments

num_cores

(integer) Number of cores.

cluster_type

(character) Type of cluster. One of c("fork", "psock").

Examples

if (FALSE) {
parallel_set(num_cores = 2)
# now the code will run on parallel with 2 cores
parallel_end()
# now the code will run sequentially
}