dvn (version 0.3.5)

dvDownload: Download a file

Description

Download a dataverse file into R or in a web browser

Usage

dvDownload(fileid, query = NULL, dv = getOption('dvn'), browser = FALSE, ...)

Arguments

fileid
A character string specifying a dataverse fileId for a file contained in a dataverse reocrd. This is distinct from the objectid that identifies the entire dataverse records.
query
An optional character string or named list of additional query parameters from dvDownloadInfo.
dv
An optional character string specifying the Dataverse to query. Default is the Harvard IQSS Dataverse.
browser
A logical specifying whether the query should be executed in a web browser. Default is FALSE.
...
Optionally, additional arguments passed to getURL via dvQuery.

Value

Details

Due to access restrictions placed on some files, not all files are directly downloadable into R. dvDownload automatically checks whether files can be downloaded directly with dvDownloadInfo and stops if direct access is unavailable. Otherwise the file is downloaded and returned.

See Also

dvDownloadInfo

Examples

Run this code
## Not run: 
# dvDownload("9956")
# ## End(Not run)

Run the code above in your browser using DataLab