#' exyear()
#' extract year from string
#' @param string string to extract from
#' @export
exyear <- function(string) {
t <- regmatches(string, regexec("[0-9]{4}", string))
sapply(t, function(x) {
if(length(x) > 0){
return(as.numeric(x))
} else {
return("")
}
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.