R/assert.R

Defines functions assert_class

assert_class <- function(object, class) {
  if (inherits(object, what = class)) {
    TRUE
  } else {
    stop("Input should be a ", class, " object!")
  }
}

Try the sigminer package in your browser

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

sigminer documentation built on May 29, 2024, 3:11 a.m.