Skip to contents

Prepend the date and time to a file name

Usage

getDatedFilename(filename)

Arguments

filename

character vector with name to use in file name

Value

A character string with filename prepended with the current date and time. The prefix is as.character() of the current time with spaces and colons replaced by underscores; it can include fractional seconds, for example 2026-10-01_15_39_25.959408_testName.

Examples

library(nprcgenekeepr)
getDatedFilename("testName")
#> [1] "2026-10-02_04_27_29.193322_testName"