append_time | R Documentation |
Given a filepath this function will append a timestamp to the filename. By
default the timestamp will be formatted as %Y_%m_%d_%H%M
.
append_time(path, time = Sys.time(), format = "%Y_%m_%d_%H%M")
path |
(character) the path to the file as if it didn't have an appended timestamp |
time |
(datetime, default = |
format |
a character string. The default for the |
a filepath
## Not run:
path <- append_time(
path = "/data/raw.xlsx",
time = ymd_hm("2021-05-20 14:30")
)
# Returns:
# "/data/raw_2021_05_20_1430.xlsx"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.