build_date_filename: Build a file name with a date/time

View source: R/build_filename.R

build_date_filenameR Documentation

Build a file name with a date/time

Description

Build a file name with a date/time

Usage

build_date_filename(
  file.name,
  date.time = Sys.time(),
  round.time.to = "day",
  time.format = "%Y-%m-%d %H:%M:%S",
  date.position = "prefix",
  file.extension = ".xlsx"
)

Arguments

file.name

A string giving the text portion of the file name

date.time

A date/time defaults to the current time

round.time.to

A string giving the date precision level

time.format

A string giving the format of the date/time

date.position

A string giving the position of the date within the file name, either as a prefix or a suffix

file.extension

A string giving the file name extension. Specification of the extension works nicely with the 'export' function in the 'rio' package.

Value

A string used as a file name including the given date/time, stem, and extension


cmstillwell/UWparserrr documentation built on Nov. 11, 2024, 10:38 p.m.