R/check_lake.R

Defines functions check_lake check_climate

check_lake <- function(lake_name){
  
  if (!tolower(lake_name) %in% tolower(get_lake_names())){
    stop(paste0('lake_name=', lake_name, ' not recognized in GLTC dataset'))
  }
}

check_climate <- function(climate_name){
  in_db <- tolower(climate_name) %in% tolower(get_climate_names())
  if (any(!in_db)){
    stop(paste0('climate_name=', climate_name[!in_db], ' not recognized in GLTC dataset'))
  }
}

Try the laketemps package in your browser

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

laketemps documentation built on May 1, 2019, 6:33 p.m.