dvDownload: Download a file

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/dvDownload.r

Description

Download a dataverse file into R or in a web browser

Usage

1
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.

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.

Value

The requested file as an R object.

Author(s)

Thomas J. Leeper

See Also

dvDownloadInfo

Examples

1
2
3
4
## Not run: 
dvDownload("9956")

## End(Not run)

dvn documentation built on May 29, 2017, 5:53 p.m.