simdf Produces a dataframe with the same distributions and correlations as an existing dataframe. Only returns numeric columns and simulates all numeric variables from a continuous normal distribution (for now).

simdf(dat, n = 100, grp_by = NULL, empirical = FALSE)

Arguments

dat

the existing dataframe

n

the number of samples to return per group

grp_by

an optional list of column names to group by

empirical

logical. Passed on to rnorm_multi

Value

tibble

Examples

iris100 <- simdf(iris, 100) iris_species <- simdf(iris, 100, "Species")