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 July 9, 2023, 5:33 p.m.