download_file | R Documentation |
Excel documents cannot be loaded from a URL and need to be downloaded to a temporary file. This is a reusable and generalisable wrapper to do just that.
download_file(url, fileext = file_ext(url), dir = tempdir(), name = NULL)
url |
(character) the URL to the destination file |
fileext |
(character; default = |
dir |
(character; default = |
name |
(character; default = |
a file path string to the downloaded file
## Not run:
download_file(
url = "https://github.com/baslat/aus_geos_data/blob/master/geos.csv?raw=true",
fileext = "csv",
dir = "./outputs",
name = "geos.csv"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.