R/zzz.R

cp <- function(x) Filter(Negate(is.null), x)
`%||%` <- function(x, y) if (is.null(x)) y else x

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 rcitoid package in your browser

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

rcitoid documentation built on May 2, 2019, 5:57 a.m.