powered by
Compare two functions signatures and tells if they are exactly the same.
matchFunctionSignature(aFunction_f_1, aFunctionTemplate_f_1 = function(){})
A boolean value.
boolean
a function or primitive. Not a string!
function
primitive
a function or primitive to be used as model. Not a string!
tools:::Rd_package_author("wyz.code.offensiveProgramming")
Maintainer: tools:::Rd_package_maintainer("wyz.code.offensiveProgramming")
To get TRUE as result, function and function model must share exactly the sames attributes names and values, including default values if any used.
TRUE
matchFunctionSignature(sum, function(..., na.rm = FALSE) { NULL }) # [1] TRUE matchFunctionSignature(sum, function(..., na.rm) { NULL }) #[1] FALSE
Run the code above in your browser using DataLab