Learn R Programming

prioritizr (version 4.1.5)

is.parallel: Is parallel?

Description

This function determines if parallel processing capabilities have been initialized.

Usage

is.parallel()

Arguments

Value

logical indicating if parallel computations will be performed in parallel where possible.

See Also

set_number_of_threads, get_number_of_threads.

Examples

Run this code
# NOT RUN {
# set number of threads to 2
set_number_of_threads(2)
# get number of threads
get_number_of_threads()

# check that parallel processing is active
is.parallel()

# reset number of threads to 1
set_number_of_threads(1)

# check that parallel processing has been deactivated
is.parallel()

# }

Run the code above in your browser using DataLab