-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflapper_opts.Rd
53 lines (49 loc) · 1.34 KB
/
flapper_opts.Rd
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/opts.R
\docType{data}
\name{flapper_opts}
\alias{flapper_opts}
\alias{flapper_run_parallel}
\alias{flapper_run_slow}
\title{Global example controls}
\format{
An object of class \code{logical} of length 1.
An object of class \code{logical} of length 1.
}
\usage{
flapper_run_parallel
flapper_run_slow
}
\description{
These variables provide convenient switches for turning examples on/off during package testing. They can be overridden by the user.
}
\details{
A set of logical variables:
\itemize{
\item \code{\link[flapper]{flapper_run_parallel}} is a logical variable that defines whether or not to run selected parallel examples.
\item \code{\link[flapper]{flapper_run_slow}} is logical variable that defines whether or not to run selected `slow' examples.
}
}
\examples{
#### 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)
}
}
\author{
Edward Lavender
}
\keyword{datasets}