make_synthesizer {synthesizer} | R Documentation |
Create a function that generates synthetic data
Description
Create a function that accepts a non-negative integer n
, and
that returns synthetic data sampled from the emperical (multivariate)
distribution of y
.
Usage
make_synthesizer(y)
## S3 method for class 'numeric'
make_synthesizer(y)
## S3 method for class 'integer'
make_synthesizer(y)
## S3 method for class 'factor'
make_synthesizer(y)
## S3 method for class 'character'
make_synthesizer(y)
## S3 method for class 'data.frame'
make_synthesizer(y)
Arguments
y |
|
Value
A function
accepting a single integer argument: the number
of synthesized values or records to return.
See Also
Other synthesis:
synthesize()
Examples
synth <- make_synthesizer(cars$speed)
synth(10)
synth <- make_synthesizer(iris)
synth(6)
synth(150)
synth(250)
[Package synthesizer version 0.2.0 Index]