R/input_validation.R

Defines functions check_model_validity

Documented in check_model_validity

#'@title Check Model Formula Validity
#'
#'@keywords internal
check_model_validity = function(model) {
  if(length(model) != 2) {
    stop(sprintf("Model (`%s`) should not have a left-hand side (here, given as `%s`). Only include the right-hand side of the formula.",
                 as.character(model), as.character(model[2])))
  }
}

Try the skpr package in your browser

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

skpr documentation built on July 9, 2023, 7:23 p.m.