Get the Open Tree of Life Taxonomic identifier (OTT id) and name of all lineages from one or more input taxa.
Source:R/opentree_taxonomy.R
get_ott_lineage.Rd
Get the Open Tree of Life Taxonomic identifier (OTT id) and name of all lineages from one or more input taxa.
Arguments
- input
Optional. A character vector of names or a
datelifeQuery
object.- ott_ids
If not NULL, it takes this argument and ignores input. A numeric vector of ott ids obtained with
rotl::taxonomy_taxon_info()
orrotl::tnrs_match_names()
ortnrs_match()
.
Examples
if (FALSE) # This is a flag for package development. You are welcome to run the example.
taxa <- c("Homo", "Bacillus anthracis", "Apis", "Salvia")
lin <- get_ott_lineage(taxa)
#> Error in eval(expr, envir, enclos): object 'taxa' not found
lin
#> Error in eval(expr, envir, enclos): object 'lin' not found
# Look up an unknown OTT id:
get_ott_lineage(ott_id = 454749)
#>
|
| | 0%
|
|======================================================================| 100%
#> $`Discelium nudum`
#> ott_ids ott_ranks
#> Discelium "508293" "genus"
#> Disceliaceae "538343" "family"
#> Funariales "821347" "order"
#> Funariidae "620630" "subclass"
#> Bryopsida "821346" "class"
#> Bryophytina "471195" "no rank"
#> Bryophyta "246594" "phylum"
#> Embryophyta "56610" "no rank"
#> Streptophyta "916750" "phylum"
#> Chloroplastida "361838" "kingdom"
#> Archaeplastida "5268475" "kingdom"
#> Eukaryota "304358" "domain"
#> cellular organisms "93302" "no rank"
#> life "805080" "no rank"
#>
# end dontrun