# NOT RUN {
# typical use case
df <- DataFactory()
# discover data generation function names
ls(df, pattern = 'draw*')
# discover recorded types
print(df$getRecordedTypes())
# discover known suffixes
print(df$retrieveKnownSuffixes())
# draw integer values using generic data generation function
# note that a semantic identifier is required, not just a known suffix extension
df$drawValues('x_i', 3)
df$drawValues('x_i_7', 16) # will draw 7 values. Semantic identifier contract wins.
# draw 8 values from aleatory chosen type
df$drawValues(paste0('x_', sample(df$retrieveKnownSuffixes(), 1)), 8)
# draw specified type (raw) using specifc data generation function
v <- df$drawRaw(10)
typeof(v) # raw
# }
Run the code above in your browser using DataLab