R/dpx.R

Defines functions dpx

Documented in dpx

#' Paste Date and (optional) folder to file name
#'
#' For easier naming of files to be saved. Adds the current date in the form of YY-MM-DD_ as a prefix to a character string. Optionally adds a folder name, too.
#'
#' @param suffix Single character string that is a file name that the date should be d
#'
#' @param folder Give the name of an optional folder name (including "/") that is pasted in front of the filename.
#'
#' @export

dpx <- function(suffix, folder = NULL){
  paste0(folder, format(Sys.Date(), "%g%m%d"),"_", suffix)
}
cfbeuchel/CarlHelpR documentation built on Dec. 24, 2019, 8:08 p.m.