Description Usage Arguments Value See Also Examples
Temporarily turn on/off parallel process.
1 2 3 | with_parallel(new, code)
local_parallel(new = list(), .local_envir = parent.frame())
|
new |
|
code |
|
.local_envir |
|
[any]
The results of the evaluation of the code
argument.
withr
for examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Not run:
with_parallel(new = "ON", {
sprintf(
"Parallel process is %s.",
ifelse(parallel_is_on(), "ON", "OFF")
)
})
with_parallel(new = "OFF", {
sprintf(
"Parallel process is %s.",
ifelse(parallel_is_on(), "ON", "OFF")
)
})
local_parallel("ON")
sprintf(
"Parallel process is %s.",
ifelse(parallel_is_on(), "ON", "OFF")
)
local_parallel("OFF")
sprintf(
"Parallel process is %s.",
ifelse(parallel_is_on(), "ON", "OFF")
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.