Learn R Programming

wyz.code.metaTesting (version 1.1.4)

setDefaultArgumentsGenerationContext: Set default arguments generation context.

Description

Use method setDefaultArgumentsGenerationContext to set default arguments generation context.

Usage

setDefaultArgumentsGenerationContext(useDefaultArguments_b_1 = TRUE,
                                     useAllDefaultArguments_b_1 = FALSE)

Arguments

useDefaultArguments_b_1

a single boolean value to specify the usage of default arguments in generated function call

useAllDefaultArguments_b_1

A single boolean value to specify usage of all default valued arguments in generated function call. Second argument is considered only when first argument is TRUE.

Value

A list holding the provided values, allowing easy reuse either interactively or programmatically, accessible through names use, and use_all.

Predefined variables named default_arguments_context and dac hold most common definition cases, and therefore greatly eases use and simplify writing.

Examples

Run this code
# NOT RUN {
# a typical instanciation
mydgc <- list(
  setDefaultArgumentsGenerationContext(FALSE, FALSE),
  setDefaultArgumentsGenerationContext(TRUE, FALSE),
  setDefaultArgumentsGenerationContext(TRUE, TRUE)
)

# uses predefined variable
print(dac$partial)
# }

Run the code above in your browser using DataLab