spice_to_eml: Convert 'dataspice' metadata to EML

Description Usage Arguments Value Examples

View source: R/spice_to_eml.R

Description

Performs an (imperfect) conversion of dataspice metadata to EML. It's very likely you will get validation errors and need to fix them afterwards but spice_to_eml is a good way to a richer metadata schema (EML) when you're already using dataspice but need a richer metadata schema.

Usage

1
spice_to_eml(spice = file.path("data", "metadata", "dataspice.json"))

Arguments

spice

(list) Your dataspice metadata. Uses data/metadata/dataspice.json by default.

Value

(emld) The crosswalked emld object

Examples

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

# And crosswalk it to EML
spice_to_eml(spice)

# We can also create dataspice metadata from scratch and crosswalk it to EML
myspice <- list(
  name = "My example spice",
  creator = "Me",
  contact = "Me"
)
spice_to_eml(myspice)

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