month_int <- function(date) {
require(lubridate)
require(tidyverse)
value = as.numeric(paste(year(date),ifelse(month(date) < 10,paste('0',as.character(month(date)),sep=''),month(date)),sep=''))
return(value)
}
time_display_hm <- function(timevalue) {
hours <- timevalue / 3600
hours_rnd <- floor(hours)
minutes <- (hours - hours_rnd) * 60
hours_rnd <- ifelse(hours_rnd<10,paste('0',hours_rnd,sep=''),hours_rnd)
minutes <- ifelse(minutes < 10,paste('0',minutes,sep=''),minutes)
time_display <- str_sub(paste(hours_rnd,minutes,sep=':'),end=5)
return(time_display)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.