crosswalk_variables: Crosswalk 'dataspice' variables to EML

Description Usage Arguments Value Examples

View source: R/eml_crosswalk.R

Description

See set_attributes for more information on what must be filled out after this is run in order to get a valid EML attributeList.

Usage

1

Arguments

spice

(list) Your dataspice metadata

Value

(data.frame) A partial EML attributes table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# Load an example dataspice JSON that comes installed with the package
spice <- system.file(
  "examples", "annual-escapement.json",
  package = "dataspice")

# Convert it to EML (notice the warning)
eml_doc <- suppressWarnings({spice_to_eml(spice)})
attributes <- crosswalk_variables(spice)

# Now fill in the attributes data.frame. See `EML::set_attributes`.

# And last, set the attributes on our EML document
eml_doc$dataset$dataTable[[1]]$attributeList <-
  EML::set_attributes(attributes)

## End(Not run)

dataspice documentation built on May 17, 2021, 1:09 a.m.