#' Add timestamp to the entire dataframe at position 1 with the provided column name
#' @param new_col_name defaults to "TIMESTAMP"
#' @importFrom magrittr %>%
#' @importFrom dplyr mutate
#' @importFrom dplyr select
#' @export
mutate_timestamp_column <-
function(dataframe, new_col_name = "TIMESTAMP") {
new_col_name <- enquo(new_col_name)
dataframe %>%
mutate(!!new_col_name := as.character(Sys.time())) %>%
select(!!new_col_name, everything())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.