R/CHECKING-check_complexity.R

Defines functions .check_complexity

.check_complexity <- function(complexity) {
  
  if (length(complexity) != 1L) {
    stop("Only one \"complexity\" is possible.", 
         call. = FALSE)
  }
  
  if (!any(tolower(complexity) %in% 
           c("any", "single", "multiple"))) {
    stop("The provided complexity is not \"any\", \"single\", or \"multiple\".", 
         call. = FALSE)
  }
  
}
NIVANorge/chemspiderapi documentation built on Jan. 10, 2021, 10:12 a.m.