chk_unused: Check ... Unused

View source: R/chk-unused.R

chk_unusedR Documentation

Check ... Unused

Description

Checks if ... is unused

length(list(...)) == 0L

Usage

chk_unused(...)

vld_unused(...)

Arguments

...

Additional arguments.

Value

The chk_ function throws an informative error if the test fails.

Functions

  • vld_unused(): Validate ... Unused

See Also

length()

For more details about the use of this function, please read the article vignette("chk-families").

Other ellipsis_checkers: chk_used()

Examples

# chk_unused
fun <- function(x, ...) {
  chk_unused(...)
  x
}
fun(1)
try(fun(1, 2))
# vld_unused
fun <- function(x, ...) {
  vld_unused(...)
}
fun(1)
try(fun(1, 2))

chk documentation built on April 3, 2025, 8:50 p.m.