ignore_unused_args {DescrTab2} | R Documentation |
do.call but without an error for unused arguments
Description
do.call but without an error for unused arguments
Usage
ignore_unused_args(what, args)
Arguments
what |
either a function or a non-empty character string naming the function to be called. |
args |
a list of arguments to the function call. The names attribute of args gives the argument names. |
Value
The result of the (evaluated) function call.
Examples
# works:
DescrTab2:::ignore_unused_args(
chisq.test,
list(x = factor(c(1, 0, 1, 1, 1, 0)), y = factor(c(0, 1, 1, 0, 1, 0)), abc = 3)
)
# would produce error:
# do.call(chisq.test, list(x=factor(c(1,0,1,1,1,0)), y=factor(c(0,1,1,0,1,0)), abc=3 ) )
[Package DescrTab2 version 2.1.16 Index]