chk_unused: Check ... Unused

Description Usage Arguments Value Functions See Also Examples

View source: R/chk-unused.R

Description

Checks if ... is unused

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

Usage

1
2
3

Arguments

...

Additional arguments.

Value

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

The vld_ function returns a flag indicating whether the test was met.

Functions

See Also

Other chk_ellipsis: chk_used()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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 July 25, 2020, 9:07 a.m.