blueprint: Blueprint a Dataset

Description Usage Arguments Value Examples

View source: R/blueprint.R

Description

Allows for the generation of population based on a prescribed set of rando functions.

Usage

1
2
3

Arguments

...

arguments used to generate the blueprint, see Examples.

bp

Object to check

Value

A function that will produce a tibble, which matches the blueprint that was provided. The generated function will take the following arguments:

is_blueprint() simply checks whether a function is a blueprinting function or not and returns a logical.

Examples

 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)

rando documentation built on Feb. 16, 2021, 5:07 p.m.