make_taxonomicCoverage: Make taxonomicCoverage EML node

View source: R/make_taxonomicCoverage.R

make_taxonomicCoverageR Documentation

Make taxonomicCoverage EML node


Make taxonomicCoverage EML node


  authority = NA, = NA,
  rank = NA,
  write.file = TRUE



(character) Taxa names as they appear in your dataset


(character) Authorities taxa.clean have been resolved to. Supported authorities include: "ITIS", "WORMS", "GBIF". For unsupported authorities, list the home page URL. For unresolved taxa use NA. If only one authority is provided, function will use that authority for all entries. If more than one authority, e.g. four, but fewer than the length of taxa.clean, is provided, function will only expand into full taxonomic classification for the first names, up to the number of authorities provided (e.g. the first four in taxa.clean); the rest of the names will not be expanded.

(character) ID of taxa.clean within the authority, otherwise NA


(character) Rank (e.g. "Genus", "Species") of taxa.clean, otherwise NA. This is useful when taxa.clean can't be resolved to an authority and the rank must be manually defined.


(character) Path of the directory to which taxonomicCoverage.xml will be written. Can also be the path of the directory containing taxa_map.csv, if using as inputs to this function.


(logical) Whether taxonomicCoverage.xml should be written to file. Default is TRUE.


This function uses get_classification() to expand taxa, resolved to supported authorities, into full taxonomic classification. Each level of classification is accompanied by an annotation (listing the authority and and common names (only when authority is ITIS or WORMS). Taxa resolved to unsupported authorities, or not resolved at all, will be listed as is defined in the taxa.clean, authority, and arguments.


emld list

The taxonomicClassification EML node for use in constructing EML metadata with the EML R library.


If write.file = TRUE.


The name of this function is a bit misleading. The return value is actually a list of taxonomicClassification nodes, which occur immediately below taxonomicCoverage (i.e. ../taxonomicCoverage/taxonomicClassification).


## Not run: 

# Set working directory

# For taxa resolved to a supported authority
taxcov <- make_taxonomicCoverage(
  taxa.clean = c("Oncorhynchus tshawytscha", "Oncorhynchus nerka"),
  authority = c("WORMS", "WORMS"), = c("158075", "254569"),
  path = ".")

# For taxa resolved to an unsupported authority
taxcov <- make_taxonomicCoverage(
  taxa.clean = c("Taxon-1", "Taxon-2"),
  authority = c("", ""), = c("123", "456"),
  path = ".")

# For taxa not resolved to an authority
taxcov <- make_taxonomicCoverage(
  taxa.clean = c("Taxon-1", "Taxon-2"),
  path = ".")

## End(Not run)

EDIorg/taxonomyCleanr documentation built on April 9, 2023, 2:43 a.m.