Randomly choose between generators
Arguments
- ...
A set of unnamed generators.
- prob
A vector of probability weights for obtaining the elements of the vector being sampled.
Examples
one_of(integer_(), character_()) %>% show_example()
#> [1] ":|u\\" "a" "EWN" "oRbI'Ov,K" "F6n\""
one_of(constant(NULL), logical_(), prob = c(0.1, 0.9)) %>% show_example()
#> [1] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE