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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.