externalFile | R Documentation |
This function takes an external file name and searches for its existence across different possible locations. It first checks the current working directory, then the package's "extdata" directory, and finally a relative "inst/extdata" path. Stop script with an error if the file cannot be found in any of the locations.
externalFile(extfile)
extfile |
Character. The name of the external file to locate. |
Character. The path of the located external file.
file.exists
, system.file
## Not run:
externalFile("data.csv") # Searches for "data.csv" in various locations
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.