| gen_example | R Documentation |
gen_example() draws one value at a fixed size with a local seed, restoring
the caller's RNG kind and state on exit, as check_law() does. It does not
expand the shrink tree. gen_no_shrink() keeps generation unchanged but
removes all shrink candidates, including those carried by composed generators.
gen_example(generator, size = 10L, seed = 1L)
gen_no_shrink(generator)
generator |
A generator. |
size |
Non-negative integer size. |
seed |
Integer seed for reproducible generation. |
gen_example() returns one generated value. gen_no_shrink() returns
an S7 generator object with the original element prototype.
gen_example(gen_vector(gen_integer()), size = 5L, seed = 42L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.