View source: R/expand_taxonomies.R
| expand_taxonomies | R Documentation |
Extracts each taxonomic level from a vector of taxonomic strings.
expand_taxonomies(
taxonomies,
levels = c("Domain", "Phylum", "Class", "Order", "Family", "Genus", "Species"),
full_names = TRUE,
delimiter = ";",
ignore
)
taxonomies |
A character vector of taxonomic strings. |
levels |
A character vector of taxonomic level names. The length of |
full_names |
Logical. If |
delimiter |
A character string of the delimiter between taxonomic levels in the input taxonomies. The default is |
ignore |
An optional character vector of taxonomic strings for which taxonomic expansion will be skipped. In the returned data frame (see return value section), the record for each skipped taxonomic string will be filled with |
Returns a data frame of extracted taxonomic levels. One record for each element of taxonomies, and one field for each element of levels. Field names are inherited from levels. If a taxonomic level is not present in a taxonomic string, then the respective cell in the returned data frame will contain NA.
get_taxonomic_level for extracting a taxonomic level from taxonomic strings.
get_consensus_taxonomy for generating a consensus taxonomy from taxonomic strings.
expand_taxonomies(taxonomies=
c("Eukaryota;Chordata;Amphibia;Caudata;Ambystomatidae;Ambystoma;Ambystoma mavortium",
"Eukaryota;Chordata;Amphibia;Anura;Bufonidae;Anaxyrus;Anaxyrus boreas",
"Eukaryota;Chordata;Amphibia;Anura;Ranidae;Rana;Rana luteiventris"),
full_names=FALSE,
delimiter=";")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.