is.consecutive: Is Node Numbering Consecutive?

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function tests whether the numbering (indexing) of terminal nodes ("tips"") of a given tree is consecutive.

Usage

1

Arguments

phy

a phylogentic tree of class "phylo"

Details

In ape when doing tree rearrangements (e.g. root and ladderize) internal and terminal nodes will keep their number (index) and the consecutive numbering of terminal and internal nodes will be disrupted. This behavior might be problematic if the elements of vectors or lists are not matched to the actual node numbers but to the expected ("canonical") node numbers. is.consecutive allows to test for the consecutivity of node numbers.

Value

TRUE or FALSE

Author(s)

Christoph Heibl

See Also

fixNodes to enforce consecutive node numering on a phylogenetic tree; is.monophyletic and is.binary to explore tree structure.

Examples

1
2
3
phy <- rtree(20)
is.consecutive(phy)
is.consecutive(ladderize(phy))

fmichonneau/phyloch documentation built on May 16, 2019, 1:45 p.m.