#' Convert time into POSIX'
#' @param t Time in seconds
to_epoch <- function(t) {
return(as.POSIXct(t/1000, origin = "1970-01-01"))
}
values <- function(l) {
return(l[, 2])
}
#' Compute the frequency based on the interval
#' @param i Frequency
freq <- function(i) {
if (i <= 60) {
return(60)
} else if (60 < i && i <= 3600) {
return(24)
} else {
return(7)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.