R/1.1.checkExplanatoryRequirements.R

Defines functions checkExplanatoryRequirements

checkExplanatoryRequirements <- function(explanatory) {
  checkNAValues <- function(col, name) {
    if (any(is.na(col))) {
      stop(paste0("Invalid '", name, "' variable. ", "Explanatory variable shouldn't have NA values!"))
    }
  }

  mapply(checkNAValues, explanatory, names(explanatory))

  return(NULL)
}

Try the Mmcsd package in your browser

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

Mmcsd documentation built on March 31, 2023, 7:23 p.m.