This is a helper function to quickly generate not-terrible filenames. This will be of the form 'day created-author-description.xlsx' Filenames are put in lower-case and spaces are replaced with dashes.
nice_filename( name = NULL, user = Sys.info()[["user"]], time = strftime(Sys.time(), "%Y-%m-%d"), ext = ".xlsx", dir = NULL, replace = FALSE )
name | A brief description of the file |
---|---|
user | The name of the creater of the file |
time | The time the file was created (i.e. |
ext | The file extension |
dir | The directory to save the file to |
replace | If |
A character vector of length 1
nice_filename("demo_file", user = "example")#> [1] "2021-08-26-example-demo_file.xlsx"