flapper_opts | R Documentation |
These variables provide convenient switches for turning examples on/off during package testing. They can be overridden by the user.
flapper_run_parallel
flapper_run_slow
An object of class logical
of length 1.
An object of class logical
of length 1.
A set of logical variables:
flapper_run_parallel
is a logical variable that defines whether or not to run selected parallel examples.
flapper_run_slow
is logical variable that defines whether or not to run selected ‘slow’ examples.
Edward Lavender
#### Example (1): flapper_run_parallel
## Illustration of intended usage for a parallelised function
if (flapper_run_parallel) {
cl_lapply(1:10,
function(x) x + 1,
cl = parallel::makeCluster(2L)
)
}
#### Example (2): flapper_run_slow
## Illustration of intended usage for a slow function
if (flapper_run_slow) {
pf_args <- dat_dcpf_histories$args
pf_args$n <- 100
pf_args$calc_distance <- "lcp"
pf_args$seed <- 1
out_pf <- do.call(pf, pf_args)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.