Learn R Programming

chk (version 0.9.2)

chk_unused: Check ... Unused

Description

Checks if ... is unused

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

Usage

chk_unused(...)

vld_unused(...)

Value

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

Arguments

...

Additional arguments.

Functions

  • vld_unused(): Validate ... Unused

See Also

Other chk_ellipsis: chk_used()

Examples

Run this code
# 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))

Run the code above in your browser using DataLab