download_d1_data: Download data and metadata from DataONE

Description Usage Arguments Value See Also Examples

View source: R/download_d1_data.R

Description

Downloads a data object from DataONE along with metadata.

Usage

1
download_d1_data(data_url, path, dir_name = NULL)

Arguments

data_url

(character) An identifier or URL for a DataONE object to download.

path

(character) Path to a directory to download data to.

dir_name

(character) (Optional) Desired name for the folder containing the downloaded data. Defaults to the data file name.

Value

(character) Path where data is downloaded to.

See Also

read_d1_files() download_d1_data_pkg()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
soi_moist_path <- download_d1_data(
                     data_url = "urn:uuid:a2834e3e-f453-4c2b-8343-99477662b570",
                     path = tempdir())
download_d1_data(
    data_url = "https://cn.dataone.org/cn/v2/resolve/urn:uuid:a2834e3e-f453-4c2b-8343-99477662b570",
    path = tempdir(),
    dir_name = "test"
    )

## End(Not run)

NCEAS/metajam documentation built on Oct. 16, 2020, 2:56 a.m.