Takes any dataset, checks format of each variable and based on distributions of the original variables randomly samples into a new dataset n times.

sampleUnivariate(inputData, n, dateFormat = "%Y%m%d")

Arguments

inputData

dataset that you want to sample from

n

number of rows in output/simulated dataset

dateFormat

format of the date variable (if one exists) in the original dataset. Default is "YYYYMMDD."

Value

A dataset with n rows that is distributionally similar to input dataset.

Details

Returns distributionally similar dataset with user-specified number of rows

Examples

sampleUnivariate()
#> Error in matrix(nrow = n, ncol = ncol(inputData)): argument "n" is missing, with no default