Learn R Programming

OpenTreeChronograms (version 2022.1.28)

get_ott_lineage: Get the Open Tree of Life Taxonomic identifier (OTT id) and name of all lineages from one or more input taxa.

Description

Get the Open Tree of Life Taxonomic identifier (OTT id) and name of all lineages from one or more input taxa.

Usage

get_ott_lineage(input = NULL, ott_ids = NULL)

Arguments

input

Optional. A character vector of names.

ott_ids

If not NULL, it takes this argument and ignores input. A numeric vector of ott ids obtained with rotl::taxonomy_taxon_info() or rotl::tnrs_match_names() or tnrs_match().

Value

A list of named numeric vectors of ott ids from input and all the clades it belongs to.

Examples

Run this code
# NOT RUN {
taxa <- c("Homo", "Bacillus anthracis", "Apis", "Salvia")
# lin <- get_ott_lineage(taxa)

# Look up an unknown OTT id:
get_ott_lineage(ott_id = 454749)

# }
# NOT RUN {
 # end donttest
# }

Run the code above in your browser using DataLab