is_root {taxa} | R Documentation |
Test if taxa are roots
Description
Check if each taxon is a root. A root is a taxon with no supertaxon.
Usage
is_root(x, subset = NULL)
Arguments
x |
An object containing taxonomic relationships, such as taxonomy objects. |
subset |
The subset of the tree to search for roots to that subset. Can be indexes or names. |
See Also
Other root functions:
roots()
Examples
x <- taxonomy(c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo',
'Panthera tigris', 'Ursidae', 'Ursus', 'Ursus arctos'),
supertaxa = c(NA, 1, 2, 3, 3, 1, 6, 7))
is_root(x)
is_root(x, subset = 2:8)
[Package taxa version 0.4.3 Index]