In functions like paste(), named arguments in ... are often a sign of misspelled argument names.

check_dots_unnamed(env = caller_env(), call = caller_env(), action = abort)

Arguments

env

Environment in which to look for ....

call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

action

The action to take when the dots have not been used. One of abort(), warn(), inform() or signal().

Examples

f <- function(..., foofy = 8) { check_dots_unnamed() c(...) } f(1, 2, 3, foofy = 4)
#> [1] 1 2 3
try(f(1, 2, 3, foof = 4))
#> Error in f(1, 2, 3, foof = 4) : #> 1 arguments in `...` had unexpected names. #> We detected these problematic arguments: #> `foof` #> Did you misspecify an argument?