`return_latest` checks for a pattern in a folder and provides the most recent file bases on the time the file was modified
return_latest(folderpath, pattern, quiet = FALSE, ...)
path to folder where file(s) are located.
pattern in file name, regex expressions. If not parttern is provided, the last file in the folder will be returned.
suppresses the output message related to the file name creation, for use in sub functions, default = FALSE
Any other valid option for `base::list.files()`.
a vector of the full filepath for the most recent version of a file stub
if (FALSE) { # \dontrun{
file_stub <- "MER_Structured_Datasets_OU_IM_FY18-20"
filepath <- return_latest("Data", file_stub)
df <- read_rds(filepath) } # }