download_file.Rd
Helper function to download files using curl::curl_download()
.
This function can be supplied in place of argument parse_fun
to download files without attempting to read their contents.
download_file(url, fname = basename(url), download_dir = tempdir())
url | The url of the file to download. |
---|---|
fname | The name of the file to save to. By default, the filename at the end of the url is used. |
download_dir | The directory to place the downloaded file in. By default, the session temporary directory is used. |
The path of the downloaded file.
if (FALSE) { download_file(paste0("https://raw.githubusercontent.com/", "InteragencyEcologicalProgram/Status-and-Trends/master/data/", "Grandtab_adultsalmon.csv")) }