R/zzz.R

cpt <- function(l) Filter(Negate(is.null), l)

assert <- function(x, y) {
  if (!is.null(x)) {
    if (!inherits(x, y)) {
      stop(deparse(substitute(x)), " must be of class ",
           paste0(y, collapse = ", "), call. = FALSE)
    }
  }
}

Try the conditionz package in your browser

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

conditionz documentation built on May 2, 2019, 6:19 a.m.