Skip to contents

Check if each taxon is an internode. An internode is a taxon with exactly one supertaxon and one subtaxon. These taxa can be removed without losing information on the relationships of the remaining taxa.

Usage

is_internode(x)

Arguments

x

The object to get internodes for, such as a taxonomy object.

See also

Other internode functions: internodes()

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_internode(x)
#> [1] FALSE  TRUE FALSE FALSE FALSE  TRUE  TRUE FALSE