Description Usage Arguments Value Examples
Wrapper to base::list.files with additional options for ignoring temporary files (which on some systems begin with "~$"), and for selecting among multiple files based on a date- or time-stamp extracted from the filename.
1 2 3 4 5 6 7 8 9 10 11 |
path |
a character vector of full path names; the default
corresponds to the working directory, |
pattern |
an optional regular expression. Only file names which match the regular expression will be returned. |
full.names |
a logical value. If |
recursive |
logical. Should the listing recurse into directories? |
ignore.case |
logical. Should pattern-matching be case-insensitive? |
include.dirs |
logical. Should subdirectory names be included in recursive listings? (They always are in non-recursive ones). |
ignore_temp |
Logical indicating whether to ignore temporary files
(files starting with "~$"). Defaults to |
select |
Select all matching files ("all") or only the single most recent file ("latest") as determined by a date or date-time stamp extracted from the file name using functions extract_date and extract_datetime, respectively. When select is "latest" and there is:
|
warn_no_date |
Logical indicating whether to give warning |
A character vector containing the names of the files in the specified directories, that match the given set of arguments (an empty character vector if no matching files are found)
1 2 3 4 | ## Not run:
list_files("~/Documents", pattern = "^exported_data_", select = "latest")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.