taxo_name.Rd
Get the names of taxa from their ids
taxo_name(taxon_ids, taxo, unique = FALSE)
taxon_ids | internal, numeric ids of the taxa. |
---|---|
taxo | a taxonomy data.frame, typically from |
unique | force names to be unique by adding the parent name when needed. |
A vector names, one for each element of taxon_ids
.
Other taxonomy-related functions:
ancestors()
,
as.taxo()
,
children()
,
descendants()
,
extract_taxo()
,
is_leaf()
,
lineage()
,
parent()
,
taxo_id()
#> levelName id #> 1 # NA #> 2 °--living 1 #> 3 ¦--fish 2 #> 4 ¦ °--egg 4 #> 5 °--mollusc 3 #> 6 ¦--snail 5 #> 7 ¦ °--egg 7 #> 8 °--squid 6taxo_name(5, taxo)#> [1] "snail"taxo_name(2:7, taxo)#> [1] "fish" "mollusc" "egg" "snail" "squid" "egg"taxo_name(2:7, taxo, unique=TRUE)#> [1] "fish" "mollusc" "egg<fish" "snail" "squid" "egg<snail"