Object that stores mock data configurations and generated datasets
Methods
Method new()
Create a new MockDataGenerator object
Arguments
configuration
list or path to YAML file with datasets configurations.
Check
configuration
for details.
For a sample YAML check
examples.
Returns
A new MockDataGenerator object
Method get_data()
Get a dataset (if does not exist, generate it)
Usage
MockDataGenerator$get_data(data_name, size = NULL, refresh = FALSE)
Arguments
data_name
string, data set name to retrieve
size
integer, size of dataset (if provided, will refresh dataset)
refresh
boolean, refresh existing data?
Method get_all_data()
Get all datasets
Usage
MockDataGenerator$get_all_data(refresh = FALSE, sizes = NULL)
Arguments
refresh
boolean, refresh existing data?
sizes
integer, or vector of integers with data sizes
Returns
list with all datasets
Method clone()
The objects of this class are cloneable with this method.
Usage
MockDataGenerator$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.