R/zzz.R

Defines functions pluck subs assert

pluck <- function(input, x) vapply(input, "[[", numeric(1), x)

subs <- function(z, start, stop) substring(z, start, stop)

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

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

isdparser documentation built on Feb. 18, 2020, 1:09 a.m.