R/check_class-internal.R

Defines functions check_class

Documented in check_class

#' Check the class of an input parameter
#' 
#' @param .param The object that you want to check the class of
#' @param .class The expected class for \code{.param}
#' 
#' @keywords internal
#' @export

check_class <- function(.param, .class){
  if(class(.param) != .class){
    stop(paste0("Wrong type supplied. Expecting parameter of class ", .class, "."))
  }
}
adletaw/captioner documentation built on Feb. 21, 2020, 10:14 p.m.