View source: R/download_dataverse_data.R
download_dataverse_data | R Documentation |
Download one or all files in a Dataverse dataset.
download_dataverse_data(id, outdir = tempdir(), files = NULL,
version = ":latest", server = NULL, key = NULL, load = TRUE,
decompress = FALSE, refresh = FALSE, branch = NULL, verbose = FALSE)
download_dataverse_info(id, server = NULL, key = NULL, refresh = FALSE,
branch = NULL, version = ":latest", verbose = FALSE)
id |
The dataset's persistent ID (e.g., |
outdir |
Directory in which to save files; defaults to a temporary directory. |
files |
Names (full or partial) of files to download, or a number or vector of numbers identifying file by index as listed on Dataverse; downloads all files in a dataset if not specified. |
version |
Version of the dataset to download. Specifying this will download all files, even if only a selection is requested. |
server |
Dataverse server; tries to get this from the DOI redirect, but falls back on
|
key |
Dataverse API key; only needed if the requested dataset is not published. If not specified,
looks for the key in |
load |
Logical; if |
decompress |
Logical; if |
refresh |
Logical; if |
branch |
Name of the repository branch, if |
verbose |
Logical; if |
download_dataverse_data
: If load
is TRUE
, an invisible list with
an entry for each data file if there are multiple files, or the loaded data file if a single file
is requested. Tabular data files are loaded as data.table
s. If load
is FALSE
,
a list with the dataset's metadata.
download_dataverse_info
: A list with the dataset's metadata.
## Not run:
metadata <- download_dataverse_info("doi:10.18130/V3/SWK71R", verbose = TRUE)
data <- download_dataverse_data("doi:10.18130/V3/SWK71R", verbose = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.