Serialize taxa pkg classes to Dublin/Darwin Core
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
R
man
.Rbuildignore
.gitignore
.travis.yml
CODE_OF_CONDUCT.md
DESCRIPTION
LICENSE
NAMESPACE
README.Rmd
README.md

README.md

taxadc

Build Status codecov Project Status: WIP - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. rstudio mirror downloads cran version

installation

remotes::install_github("ropenscilabs/taxadc")
library("taxadc")
library("xml2")

simple darwin core

out <- darwin_simple(type = "PhysicalObject", 
  modified = "2009-02-12", language = "en", 
  basisOfRecord = "PreservedSpecimen", taxonID = "12345", 
  scientificName = "Poa annua")
xml <- darwin_as_xml(out)
xml_structure(xml)
#> <SimpleDarwinRecordSet [schemaLocation, xmlns, xmlns:dc, xmlns:dwc, xmlns:xsi]>
#>   <SimpleDarwinRecord>
#>     <type>
#>       {text}
#>     <modified>
#>       {text}
#>     <language>
#>       {text}
#>     <basisOfRecord>
#>       {text}
#>     <taxonID>
#>       {text}
#>     <scientificName>
#>       {text}
write_xml(xml, (f <- tempfile(fileext=".xml")))
readLines(f, n = 2)
#> [1] "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"                                                                                                                                                                                                                                                                                 
#> [2] "<SimpleDarwinRecordSet xmlns=\"http://rs.tdwg.org/dwc/xsd/simpledarwincore/\" xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:dwc=\"http://rs.tdwg.org/dwc/terms/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://rs.tdwg.org/dwc/xsd/simpledarwincore/ ../../xsd/tdwg_dwc_simple.xsd\">"

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for taxadc in R doing citation(package = 'taxadc')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.