data-raw
Get a zip file from a URL, extract contents, and save file in
data-raw
. If the file already exists there, it is only retrieved if
force
is set to TRUE
. If offline
is FALSE
, then
NULL
is returned if the file isn't already downloaded.
unzip_to_data_raw(url, file_name, force = FALSE, verbose = FALSE,
offline = TRUE, data_raw_path = "data-raw")download_to_data_raw(url, file_name = regmatches(url, regexpr("[^/]*$",
url)), offline = TRUE, data_raw_path = "data-raw")
URL of a zip file
file name of a single file in that zip
logical, if TRUE, then download even if already in
data-raw
single logical value, if TRUE
then produce verbose
messages
single logical, if TRUE
then don't pull the file from
internet, only return path and file name if the file already exists in
data-raw. This is helpful for testing without using the internet.
path where the data-raw directory is.
path of unzipped file in data-raw
The file name is changed to a conservative cross platform name using
make.names