get_file_or_dir | R Documentation |
Checks if a provided path is a directory or a file. This allows a user to pass either a directory
of files matching a provided pattern
or a single file matching a provided pattern
.
get_file_or_dir(
path,
pattern = "^(acs_nsqip_puf|puf_tar_[a-z]{1,4})(?:\\d{2})?(?:.*)?\\.txt$"
)
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. |
either a list of file paths or a single file path.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.