R/get_date_code.R

get_date_code = function(date){
  GT_Dates = GT_Options$Date
  
  #Get right date
  right_date = filter(GT_Dates, name == date)
  if(nrow(right_date) == 0)
    stop(paste0("The selected timeframe is not available. Available options are:\n",paste(unique(GT_Dates$name),collapse=", ")))
  else
    return(right_date$id)
}
RossiLorenzo/trendR documentation built on May 9, 2019, 10:32 a.m.