R/condition.R

Defines functions is.condition condition

Documented in condition

#' condition
#'
#' @param subclass
#' @param message
#' @param call
#' @param ...
#'
#' @return
#' @export
#'
#' @examples
condition <- function(subclass,
                      message,
                      call = sys.call(-1),
                      ...) {
  structure(
    class = c(subclass, "condition"),
    list(message = message, call = call),
    ...
  )
}

#
is.condition <- function(x) inherits(x, "condition")
Health-Economics-in-R/QALY documentation built on Oct. 26, 2020, 2:28 a.m.