simdf.Rd
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)
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 |
tibble
iris100 <- simdf(iris, 100) iris_species <- simdf(iris, 100, "Species")