powered by
synthesize() is a convenience wrapper around fit_synthesizer() and generate(). Optionally the result is written to a file in any format supported by write_data().
synthesize()
fit_synthesizer()
generate()
write_data()
synthesize( data, n = NULL, seed = NULL, dependence = 1, closeness = 1, perturb = NULL, file = NULL, format = NULL, ... )
The synthetic data (invisibly if file is given).
file
Training data (data frame, matrix, vector or ts).
ts
Number of synthetic records. Defaults to the size of data.
data
Optional random seed (applies to fitting and generation).
Dependence strength in [0, 1]; see generate().
Closeness to the real data and optional perturbation; see generate().
Optional output file path. The format is inferred from the extension (see supported_formats()).
supported_formats()
Optional explicit file format, overriding the extension.
Arguments passed to fit_synthesizer().
syn <- synthesize(iris, n = 200, seed = 1) summary(syn) out <- tempfile(fileext = ".csv") synthesize(mtcars, file = out, seed = 1) head(read_data(out))
Run the code above in your browser using DataLab