generateData {wyz.code.metaTesting} | R Documentation |
Generate Data
Description
Function to generate data.
Usage
generateData(function_f_1,
argumentsTypeRestrictions_l = list(),
replacementContext_l = setGenerationContext(),
ellipsisReplacementContext_l = setGenerationContext(),
defaultArgumentsContext_l = setDefaultArgumentsGenerationContext(),
functionName_s_1 = deparse(substitute(function_f_1))
)
Arguments
function_f_1 |
a single R |
argumentsTypeRestrictions_l |
a named |
replacementContext_l |
a generation context |
ellipsisReplacementContext_l |
an ellipsis replacement context |
defaultArgumentsContext_l |
a default argument context |
functionName_s_1 |
A character |
Details
Generate a driven aleatory set of data to be used as argument in a call to function
fun_f_1
. Generation is driven by the argumentsTypeRestrictions_l
argument.
Value
A object
with following names
generation | argument name generation |
codedata | the generated data |
context | data type generation context |
n | number of first level data generations |
See Also
Refer to coderetrieveDataFactory and to
testFunction
.
Examples
# typical example
op_sum <- opwf(sum, c('...', 'removeNA_b_1'))
op_sum_atr <- list('...' = c('i', 'd', 'c'))
ec <- setGenerationContext(0, TRUE, FALSE)
gd <- generateData(op_sum, op_sum_atr, ec, erc$hetero_vector[[1]], dac$none)