systime <- function(stripchars = FALSE) {
# Print the current time formatted as a string.
#
# Arguments:
# stripchars {logical} -- if True, strip dashes and colons from datetime string and return
# YYYYMMDD_HHMMSS. If False, return as YYYY-MM-DD HH:MM:SS
#
# Returns:
# {char}
stopifnot(is.logical(stripchars))
x = Sys.time()
formatted_timestamp = paste0(
format(x, "%Y"), format(x, "%m"), format(x, "%d"), "_",
format(x, "%H"), format(x, "%M"), format(x, "%S"))
return(formatted_timestamp)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.