existing_files | R Documentation |
This is a shorthand of x[file.exists(x)]
, and optionally returns the
first existing file path.
existing_files(x, first = FALSE, error = TRUE)
x |
A vector of file paths. |
first |
Whether to return the first existing path. If |
error |
Whether to throw an error when |
A vector of existing file paths.
xfun::existing_files(c("foo.txt", system.file("DESCRIPTION", package = "xfun")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.