Learn R Programming

wyz.code.metaTesting (version 1.1.4)

opwf: Offensive Programming Wrap Function

Description

Create an offensive programming function, wrapping a standard R function.

Usage

opwf(fun_f_1, parameterNames_s, functionName_s_1 = NA_character_)

Arguments

fun_f_1

a single R function

parameterNames_s

the new names of the parameter function, must be semantic argument names. Must be a bijection to real fun_f_1 argument names.

functionName_s_1

A character vector of length 1, holding the function name. Default value, implies evaluation using deparse(substitute(fun_f_1)). This is particularly useful, in scripts.

Value

A R function which takes given parameterNames_s as arguments.

Details

Arguments default values, if any, are managed, and should be correctly and automatically substituted.

See Also

Refer to testFunction

Examples

Run this code
# NOT RUN {
# typical example
op_sum <- opwf(sum, c('...', 'removeNA_b_1'))

# example with substituted argument in existing default valued arguments
op_append <- opwf(append, c('originalValues_', 'valuesToInsert_', 'afterIndex_ui_1'))
# }

Run the code above in your browser using DataLab