Checks whether an argument was supplied to ....
Arguments
- ...
the
...argument passed from a calling function. The argument is not evaluated. See Examples.- .msg
an optional alternative message to display if an error is thrown instead of the default message.
- .call
the execution environment of a currently running function, e.g.
.call = rlang::current_env(). The corresponding function call is retrieved and mentioned in error messages as the source of the error. Passed toerr(). Set toNULLto omit call information. The default is to search along the call stack for the first user-facing function in another package, if any.
Details
arg_dots_supplied() checks whether arguments were passed to the ... (i.e., "dots") argument of a function. These arguments are not evaluated. arg_dots_supplied() throws an error if ...length() is 0. It can be useful for when a function must have additional arguments. For example, arg_or() and when_supplied() use arg_dots_supplied().
arg_dots_not_supplied() checks whether no arguments were passed to ..., again without evaluating the arguments and using ...length(). It can be useful when a function appears to allow further arguments (e.g., because it is a method of a generic), but when the author does not want the user to supply them.