R/check_output.R

Defines functions .check_output

#' @keywords internal
.check_output <- function(x, id) {
  x[[id]] <- NULL
  # Check that all identified comorbidity domains are either 0 or 1
  if (!all(x == 0 | x == 1)) stop("'comorbidity()' ended up in an unexpected state.\nPlease report a bug with a reproducible example at https://github.com/ellessenne/comorbidity/issues\n", call. = FALSE)
}
ellessenne/comorbidity documentation built on May 4, 2023, 10:36 p.m.