R/input_checks.R

Defines functions check_input_module

Documented in check_input_module

#' check_input_module
#'
#' @param x test
#'
#' @export
check_input_module <- function(x) {
  modules <- c("view", "summarise", "list", "tabulate", "glance", "examples", "tutorial")
  if (!(x %in% modules)) {
    stop(
      "The first argument names the module you want to use and must be one of: ", 
      paste(modules, collapse = ", "), 
      ". See the help module or the more comprehensive -h for more information."
    )
  }
}
sidora-tools/sidora.cli documentation built on Aug. 1, 2020, 11:48 a.m.