modifyFunction: modify default arguments of a function

Description Usage Arguments Value Examples

View source: R/misc.R

Description

modify default arguments of a function

Usage

1

Arguments

f

A function to be modified

...

Arguments an values key pairs

Value

A function with modified default values

Examples

1
2
3
# function twoClassSummary has an argument 'metric' which defaults to long vector of metrics,
# to make a numer twoClassSummary function that returns only 'Kappa' and 'AUC', we can do
newTwoClassSummary <- modifyFunction(twoClassSummary, metric = c('Kappa', 'AUC'));

linxihui/lazyML documentation built on May 21, 2019, 6:39 a.m.