R/utils.R

Defines functions checkFields testGlmer

Documented in checkFields

#' Title
#'
#' @param neededFields 
#' @param df 
#'
#' @return
checkFields<-function(neededFields,df){
  #Check needed columns
  #neededFields<-c("eunishabitatstypename","alien","locality","eunisspeciesgroups","scientificname")
  
  missingFields<-!neededFields %in% colnames(df)
  if(sum(missingFields)){
    stop(paste('Input data need the following fields:',paste(neededFields[missingFields], collapse=", " )))
  }
}

#' @import lme4
#' 
#' @export
testGlmer<-function(){
  print(glmer)
}
ptagliolato/vlab documentation built on May 26, 2019, 11:32 a.m.