View source: R/make_taxonomicCoverage.R
make_taxonomicCoverage | R Documentation |
Make taxonomicCoverage EML node
make_taxonomicCoverage(
taxa.clean,
authority = NA,
authority.id = NA,
rank = NA,
path,
write.file = TRUE
)
taxa.clean |
(character) Taxa names as they appear in your dataset |
authority |
(character) Authorities |
authority.id |
(character) ID of |
rank |
(character) Rank (e.g. "Genus", "Species") of |
path |
(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. |
write.file |
(logical) Whether taxonomicCoverage.xml should be written to file. Default is |
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 authority.id
) 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 authority.id
arguments.
emld list |
The taxonomicClassification EML node for use in constructing EML metadata with the EML R library. |
taxonomicCoverage.xml |
If |
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
setwd("/Users/me/Documents/data_packages/pkg_260")
# For taxa resolved to a supported authority
taxcov <- make_taxonomicCoverage(
taxa.clean = c("Oncorhynchus tshawytscha", "Oncorhynchus nerka"),
authority = c("WORMS", "WORMS"),
authority.id = c("158075", "254569"),
path = ".")
# For taxa resolved to an unsupported authority
taxcov <- make_taxonomicCoverage(
taxa.clean = c("Taxon-1", "Taxon-2"),
authority = c("https://some-authority.org", "https://some-authority.org"),
authority.id = 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.