Description Usage Arguments Value
View source: R/downloadAndSaveRDS.R
This is a utility function that will download a zip file and extract the data.
1 2 3 4 5 6 7 8 9 | downloadAndSaveRDS(
url,
filename = tools::file_path_sans_ext(basename(url)),
download.dir = "data-raw/",
out.dir = "data/",
filetypes = c("mdb", "aacdb", "csv"),
redownload = FALSE,
cleanup = FALSE
)
|
url |
the url of the ZIP file containing the data. |
filename |
the name of the RDS file to write (excluding file extension). |
download.dir |
directory to download the ZIP file. |
out.dir |
directory to write the RDS file. |
filetypes |
file extensions to look for in the ZIP file to convert to RDS. |
redownload |
whether to redownload the ZIP file. |
cleanup |
delete the downloaded ZIP file if the RDS file was created successfully. |
the data object read. This would be a data frame (for CSV files) or a list (for MDB and AACDB files).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.