R/check_missing.R

Defines functions check_missing

Documented in check_missing

#' Throw an error if `x` contains `NA`.
#'
#' Returns nothing if `x` is good.
#'
#' @param x object to check
check_missing <- function(x) {
  if (anyNA(x)) {
    stop('`x` cannot contain `NA`')
  }
}
melodymzmz/ohwhaley documentation built on Dec. 21, 2021, 4:56 p.m.