R/model_names_checks.R

Defines functions model_names_checks

model_names_checks = function(model_list, model_names){
  
  # check model names same length as model list ----
  
  if(!is.null(model_names)){
    if(length(model_names) != length(model_list)){
      stop('model_list and model_names not same length.')
    }
  }
  
  
  # check model names are unique ----
  
  if (!is.null(model_names)){
    if(length(unique(model_names)) != length(model_names)){
      stop('model_names not unique.')
    }
  }
  
}

Try the paramhetero package in your browser

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

paramhetero documentation built on April 26, 2022, 1:06 a.m.