#' Display time taken message
#'
#' Helper function for displaying time taken messages within other functions. Use
#' \code{\link[base]{proc.time}} at start of function and supply this as the
#' `start_time` parameter to this function.
#'
#' @param start_time The start time.
#' @noRd
#' @return A message stating time taken since start time
time_taken_message <- function(start_time) {
# get time taken
time_taken <- proc.time() - start_time
# display message
message("Time taken: ",
(time_taken[3] %/% 60),
" minutes, ",
(round(time_taken[3] %% 60)),
" seconds.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.