opwf: Offensive Programming Wrap Function

View source: R/opwf.R

opwfR Documentation

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 actual fun_f_1 argument names.

functionName_s_1

A string holding the function name. Default value, implies evaluation using deparse(substitute(fun_f_1))

Details

If any arguments default values are present, they are managed transparently and should be correctly and automatically substituted.

Value

A R function which takes given parameterNames_s as arguments.

Author(s)

Fabien Gelineau <neonira@gmail.com>

Maintainer: Fabien Gelineau <neonira@gmail.com>

See Also

Refer to testFunction

Examples

# 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'))

wyz.code.metaTesting documentation built on Sept. 25, 2023, 9:06 a.m.