Download a single file from the ICEWS Dataverse repository and unzip if neccessary

download_file(file, to_dir, repo = "historic", file_id = NULL, new_name = NULL)

Arguments

file

Name (label) of the file on DVN to download. If zipped, it will automatically be unzipped.

to_dir

Destination directory.

repo

Which repo is the file in? ("historic" or "weekly")

file_id

Optionally, integer file ID. If this is specified, it will preferentially be used over the file name to download the file. This is needed for duplicate file names.

new_name

Optionally, a new file name for the file. Useful for duplicate files.

Value

Silently returns the downloaded file name.

Details

To get a list of files available for download, see get_dvn_manifest.