knitr::opts_chunk$set(
  collapse = TRUE,
  out.width = "100%",
  out.height = "150px"
)
library(knitr)
library(magrittr)
library(stringr)
library(dplyr)

emlspice

Functions for translating EML into dataspice tabular formats:

Installation

devtools::install_github("isteves/dataspice")

Example

library(emlspice)
library(eml2)

eml_path <- system.file("LeConte_meteo_metadata.xml", package = "emlspice")
eml <- read_eml(eml_path)

Currently, there are 4 functions in the package, which each take an emld object (using eml2::read_eml and translates it to a dataspice table.

Here are the first few lines of each tabular format:

es_access(eml)
es_access(eml) %>% head() %>% kable() 
es_attributes(eml)
es_attributes(eml) %>% head() %>% kable() 
es_biblio(eml)
es_biblio(eml) %>% 
    mutate(license = str_replace_all(license, "\n", "")) %>% 
    kable() 
es_creators(eml)
es_creators(eml) %>% head() %>% kable() 


isteves/emlspice documentation built on May 17, 2019, 1:29 p.m.