R/CHECKING-check_coerce.R

Defines functions .check_coerce

.check_coerce <- function(coerce) {
  
  if (length(coerce) != 1L) {
    stop("Please provide one logical (TRUE/FALSE) to indicate if you want to \"coerce\".", 
         call. = FALSE)
  }
  
  if (!is.logical(coerce)) {
    stop("Please use a logical (TRUE/FALSE) to indicate if you want to \"coerce\".", 
         call. = FALSE)
  }
  
}
NIVANorge/chemspideR documentation built on Jan. 8, 2021, 7:48 a.m.