ropensci / EML

Ecological Metadata Language interface for R: synthesis and integration of heterogenous data
https://docs.ropensci.org/EML
Other
97 stars 33 forks source link

dataset and datatable entries from README example fail #331

Closed ChristineStawitz-NOAA closed 2 years ago

ChristineStawitz-NOAA commented 2 years ago

Hi,

I'm working on a toy example based on the one in the README as follows:

my_eml <- eml$eml(
packageId = uuid::UUIDgenerate(),  
system = "uuid",
dataset = eml$dataset(
  title = "Landings",
  creator = christine,
  pubDate = "2021",
  keywordSet = keywordSet,
  coverage = coverage,
  dataTable = eml$dataTable(
    entityName = "landings.csv",
    entityDescription = "table of fishery landings",
    physical = physical,
    attributeList = attributeList)
))

eml_validate(my_eml)

This returns FALSE and "Element 'dataTable': This element is not expected. Expected is one of ( annotation, purpose, introduction, gettingStarted, acknowledgements, maintenance, contact )."

How would we define a dataTable within a dataset as in the example from the README?

jeanetteclark commented 2 years ago

Hi @ChristineStawitz-NOAA - it looks like you might be missing the required contact element.

Does this work for you?

my_eml <- eml$eml(
packageId = uuid::UUIDgenerate(),  
system = "uuid",
dataset = eml$dataset(
  title = "Landings",
  creator = christine,
  contact = christine,
  pubDate = "2021",
  keywordSet = keywordSet,
  coverage = coverage,
  dataTable = eml$dataTable(
    entityName = "landings.csv",
    entityDescription = "table of fishery landings",
    physical = physical,
    attributeList = attributeList)
))

eml_validate(my_eml)
ChristineStawitz-NOAA commented 2 years ago

Oh, I think so! At least, I'm now getting a different error. Thank you!