is_leaf.RdTests whether taxa are leaves in a taxonomic tree
is_leaf(taxon_ids, taxo)
| taxon_ids | internal, numeric ids of the taxa. |
|---|---|
| taxo | a taxonomy data.frame, typically from |
Other taxonomy-related functions:
ancestors(),
as.taxo(),
children(),
descendants(),
extract_taxo(),
lineage(),
parent(),
taxo_id(),
taxo_name()
#> levelName id #> 1 # NA #> 2 °--living 1 #> 3 ¦--fish 2 #> 4 ¦ °--egg 4 #> 5 °--mollusc 3 #> 6 ¦--snail 5 #> 7 ¦ °--egg 7 #> 8 °--squid 6is_leaf(5, taxo)#> [1] FALSEis_leaf(6, taxo)#> [1] TRUEis_leaf(NA, taxo)#> [1] NA#> [1] FALSE NA TRUE NA