Learn R Programming

chk (version 0.10.0)

chk_used: Check ... Used

Description

Checks if is ... used using

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

Usage

chk_used(...)

vld_used(...)

Value

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

Arguments

...

Additional arguments.

Functions

  • vld_used(): Validate ... Used

See Also

length()

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

Other ellipsis_checkers: chk_unused()

Examples

Run this code
# chk_used
fun <- function(x, ...) {
  chk_used(...)
  x
}
try(fun(1))
fun(1, 2)
# vld_used
fun <- function(x, ...) {
  vld_used(...)
}
fun(1)
fun(1, 2)

Run the code above in your browser using DataLab