
Last chance! 50% off unlimited learning
Sale ends in
...
of its caller. A
utility to be used e.g., in S3 methods which need a formal ...
argument but do not make any use of it. This helps catching user
errors in calling the function in question (which is the caller of
chkDots()
.
chkDots(..., which.call = -1, allowed = character(0))
sys.call()
. A caller may
use -2 if the message should mention its caller....
which are “allowed” and hence not
warned about.warning
, ...
.
seq.default ## <- you will see ' chkDots(...) '
seq(1,5, foo = "bar") # gives warning via chkDots()
## warning with more than one ...-entry:
density.f <- function(x, ...) NextMethod("density")
x <- density(structure(rnorm(10), class="f"), bar=TRUE, baz=TRUE)
Run the code above in your browser using DataLab