double_ {quickcheck} | R Documentation |
Double generators
Description
A set of generators for double vectors.
Usage
double_(
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE,
big_dbl = FALSE
)
double_bounded(
left,
right,
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE
)
double_left_bounded(
left,
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE,
big_dbl = FALSE
)
double_right_bounded(
right,
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE,
big_dbl = FALSE
)
double_positive(
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE,
big_dbl = FALSE
)
double_negative(
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE,
big_dbl = FALSE
)
double_fractional(
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE,
big_dbl = FALSE
)
double_whole(
len = c(1L, 10L),
any_na = FALSE,
any_nan = FALSE,
any_inf = FALSE,
big_dbl = FALSE
)
Arguments
len |
Length of the generated vectors. If |
any_na |
Whether |
any_nan |
Whether |
any_inf |
Whether |
big_dbl |
Should doubles near the maximum size be
included? This may cause problems because if the result
of a computation results in a double larger than the
maximum it will return |
left |
The minimum possible value for generated numbers, inclusive. |
right |
The maximum possible value for generated numbers, inclusive. |
Value
A quickcheck_generator
object.
Examples
double_() %>% show_example()
double_(big_dbl = TRUE) %>% show_example()
double_bounded(left = -5, right = 5) %>% show_example()
double_(len = 10L, any_na = TRUE) %>% show_example()
double_(len = 10L, any_nan = TRUE, any_inf = TRUE) %>% show_example()