ignore_unused_args | R Documentation |
do.call but without an error for unused arguments
ignore_unused_args(what, args)
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. |
The result of the (evaluated) function call.
# 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 ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.