ignore_unused_args: do.call but without an error for unused arguments

Description Usage Arguments Value Examples

Description

do.call but without an error for unused arguments

Usage

1

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

1
2
3
4
5
6
7
8
# 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 ) )

DescrTab2 documentation built on Dec. 11, 2021, 10 a.m.