convert_to_dwca: Convert a dataset to the Darwin Core Archive format

Description Usage Arguments Details Value Examples

View source: R/convert_to_dwca.R

Description

Convert a dataset to the Darwin Core Archive format

Usage

1
2
3
4
5
6
7
8
9
convert_to_dwca(
  path,
  core_name,
  source_id,
  derived_id,
  url = NULL,
  user_id,
  user_domain
)

Arguments

path

(character) Path to which the DwC-A data objects and EML will be written.

core_name

(character) The central table of the DwC-A dataset being created. Can be: "event" (event core). Occurrence core is not yet supported.

source_id

(character) Identifier of an ecocomDP dataset published in a supported repository. Currently, the EDI Data Repository is supported.

derived_id

(character) Identifier of the DwC-A dataset being created.

url

(character) URL to the publicly accessible directory containing DwC-A data objects. This argument supports direct download of the data entities by a data repository and is used for automated revisioning and publication.

user_id

(character) Identifier of user account associated with the data repository in which this ecocomDP dataset will be archived. Only user_id from the EDI is currently supported.

user_domain

(character) Domain (data repository) the user_id belongs to. Currently, EDI is supported.

Details

Reads in an ecocomDP dataset from a supported repository and converts it to a DwC-A package.

Value

DwC-A tables, meta.xml, and corresponding EML metadata.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# Create directory for DwC-A outputs
mypath <- paste0(tempdir(), "/data")
dir.create(mypath)

# Convert an EDI published ecocomDP dataset to a DwC-A
convert_to_dwca(
  path = mypath, 
  core_name = "event", 
  source_id = "edi.193.5", 
  derived_id = "edi.834.2", 
  user_id = "ecocomdp",
  user_domain = "EDI")

dir(mypath)

# Clean up
unlink(mypath, recursive = TRUE)

## End(Not run)

ecocomDP documentation built on Oct. 19, 2021, 1:08 a.m.