taxo_id: Get the ids of taxa from their names

View source: R/taxo.R

taxo_idR Documentation

Get the ids of taxa from their names

Description

Get the ids of taxa from their names

Usage

taxo_id(taxon_names, taxo)

Arguments

taxon_names

vector of character strings with taxonomic names

taxo

a taxonomy data.frame, typically from extract_taxo().

Value

A vector ids, one for each element of taxon_names. Currently, this does not disambiguate between taxa with the same name and just returns the id of the first match in the taxonomy.

See Also

Other taxonomy-related functions: ancestors(), as.taxo(), children(), descendants(), extract_taxo(), is_leaf(), lineage(), parent(), taxo_name()

Examples

taxo
taxo_id("squid", taxo)
taxo_id("foo", taxo)
# NB:
taxo_id("egg", taxo)

jiho/ecotaxar documentation built on Jan. 16, 2024, 12:26 a.m.