path_* functions return paths to one or more files of interest
containing the supplied date in their names and ending with the supplied
file extension. These are convenience wrappers around path_by_date(), which
returns path that contain a specified date given additional parameters.
path_by_date( dir, date_format, date_regex, date = NULL, file_regex = ".*{date}.*", type = "any", force_latest = TRUE )
| dir | The directory holding the files of interest |
|---|---|
| date_format | The format of the date in the file name; see
|
| date_regex | A regular expression matching the date in the file name. This will hopefully be deprecated in the future, but is currently needed for extracting dates from the file path strings. |
| date | A |
| file_regex | A regular expression matching the file names of interest.
The location of the date in the file name is specified using |
| type | The file type(s) to return, one or more of |
| force_latest | If multiple files with the given |
An fs_path character vector
path_nit() returns path(s) to NIT data
path_nca() returns path(s) to NCA data