R/chkor.R

Defines functions chkor

Documented in chkor

#' Check OR
#'
#' The `chkor()` function has been deprecated for the faster `chkor_vld()`.
#'
#' `r lifecycle::badge("deprecated")`
#'
#' @param ... Multiple `chk_` functions.
#'
#' @return An informative error if the test fails.
#'
#' @seealso [chk_null_or()]
#'
#' @export
#'
#' @examples
#' chkor()
#' chkor(chk_flag(TRUE))
#' try(chkor(chk_flag(1)))
#' try(chkor(chk_flag(1), chk_flag(2)))
#' chkor(chk_flag(1), chk_flag(TRUE))
chkor <- function(...) {
  lifecycle::deprecate_soft("0.6.1", "chkor()", "chkor_vld()")
  quos <- enquos(...)

  invisible(chkor_quos(quos))
}

Try the chk package in your browser

Any scripts or data that you put into this service are public.

chk documentation built on Oct. 6, 2023, 9:06 a.m.