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 Aug. 21, 2023, 9:08 a.m.