Description Usage Arguments Value Examples
Allows for the generation of population based on a prescribed set of rando functions.
1 2 3 | blueprint(...)
is_blueprint(bp)
|
... |
arguments used to generate the blueprint, see Examples. |
bp |
Object to check |
A function that will produce a tibble, which matches the blueprint that was provided. The generated function will take the following arguments:
...
- any arguments that are used within the blueprinting
n
- the number of rows that the resulting tibble should be
.seed
- the random seed to set before generating the data
is_blueprint()
simply checks whether a function is a blueprinting
function or not and returns a logical.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | make_tbl <- blueprint(
x = r_norm(),
y = r_norm()
)
make_tbl(n = 2)
make_tbl(n = 5)
# Blueprints can use additional parameters:
make_tbl2 <- blueprint(
x = r_norm(mean = x_mu),
y = r_unif(min = y_min, max = y_max)
)
# Which are simply passed to the generated function
make_tbl2(x_mu = 10, y_min = -10, y_max = -5)
is_blueprint(make_tbl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.