Skip to contents

Checks if is ... used using

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

Usage

chk_used(...)

vld_used(...)

Arguments

...

Additional arguments.

Value

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

Functions

  • vld_used(): Validate ... Used

See also

Other chk_ellipsis: chk_unused()

Examples

# chk_used
fun <- function(x, ...) {
  chk_used(...)
  x
}
try(fun(1))
#> Error in fun(1) : `...` must be used.
fun(1, 2)
#> [1] 1
# vld_used
fun <- function(x, ...) {
  vld_used(...)
}
fun(1)
#> [1] FALSE
fun(1, 2)
#> [1] TRUE