R/check_class-internal.R

#' 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, "."))
  }
}

Try the captioner package in your browser

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

captioner documentation built on May 2, 2019, 10:13 a.m.