lineage: Get the full lineage of a taxon

View source: R/taxo.R

lineageR Documentation

Get the full lineage of a taxon

Description

Get the full lineage of a taxon

Usage

lineage(taxon_ids, taxo, rooted = FALSE)

Arguments

taxon_ids

internal, numeric ids of the taxa.

taxo

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

rooted

when TRUE, add a root (#) to the lineage path.

Value

A vector of strings containing the lineage for each element of taxon_ids.

See Also

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

Examples

print(as.Node(taxo), "id")
lineage(6, taxo)
lineage(6, taxo, rooted=TRUE)
lineage(c(6, 7), taxo)
lineage(NA, taxo)
lineage(c(6, NA), taxo)

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