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/chemspiderapi documentation built on Jan. 10, 2021, 10:12 a.m.