Get a zip file from a URL, extract contents, and save file in the raw data
directory. 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 = get_raw_data_dir(),
save_name = file_name)download_to_data_raw(url, file_name = regmatches(url, regexpr("[^/]*$",
url)), offline = TRUE, data_raw_path = get_raw_data_dir())
URL of a zip file
file name of a single file in that zip
logical, if TRUE, then download even if already in the raw data directory
single logical value, defaults to FALSE
in most functions.
single logical, if TRUE
then don't pull the file from
internet, only return path and file name if the file already exists in the
raw data directory. This is helpful for testing without using the internet.
path where the raw directory is
path of unzipped file in the raw data directory
The file name is changed to a conservative cross platform name using
make.names