R/stopIfNotConsistent.R

Defines functions stopIfNotConsistent

#' Stop if the results were not derived from an internally consistent model type
stopIfNotConsistent <- function(result, method) {
  allowedTypes <- c('consistency', 'regression')
  if (!(tolower(result[['model']][['type']]) %in% allowedTypes)) stop(paste("Can only apply", method, "to models of the following types:", paste(allowedTypes, collapse=", ")))
}

Try the gemtc package in your browser

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

gemtc documentation built on Aug. 21, 2026, 9:07 a.m.