check_one_of: Check valid values

View source: R/input-check.R

check_one_ofR Documentation

Check valid values

Description

Check valid values

Usage

check_one_of(
  input,
  against,
  ref.input = NULL,
  fdb.fn = "stop",
  fdb.opt = 1,
  ref.opt.2 = "valid input options",
  suggest = TRUE,
  verbose = TRUE,
  with.time = FALSE,
  in.shiny = FALSE,
  ...
)

Arguments

input

An input vector to be checked.

against

A vector of valid inputs.

ref.input

Character value or NULL. The reference for argument input input.

Details

Error message is build via glue::glue() building the following string:

"Value/Values 'invalid values' of ref.input is/are invalid. Valid input options are: 'valid inputs'."

Value

An error message or an invisible TRUE if all values of input are valid.


kueckelj/confuns documentation built on June 28, 2024, 9:19 a.m.