R/present.R

Defines functions present

Documented in present

#' Tests whether an argument to a function is present.
#'
#' This function is the opposite of missing.
#' @param ... list. The list of things to check for presence.
#' @export
present <- function(...) {
  try(get(deparse(substitute(...)),
    envir = parent.frame(), inherits = FALSE), silent = TRUE) %isnot% "try-error"
}
peterhurford/checkr documentation built on May 25, 2019, 1:50 a.m.