R/format_sys_time.R

Defines functions format_sys_time

Documented in format_sys_time

#' Format "Sys.time()" output to use on filenames
#'
#' Remove some OSes reserved characters of the output of Sys.time() in
#' order to allow adding it to filenames without generating problems. The output
#' looks like 2019-12-13_16h57m44s ('\%Y-\%m-\%d_\%Hh\%Mm\%Ss').
#' @keywords format, time
#' @export
#' @examples
#' format_sys_time()

format_sys_time <-
  function() {
    format(Sys.time(), "%Y-%m-%d_%Hh%Mm%Ss")
  }
mtcruz/mtcruzr documentation built on Dec. 26, 2019, 11:04 p.m.