fixNodes: Standard Node Numbering in Phylo Objects

View source: R/fixNodes.R

fixNodesR Documentation

Standard Node Numbering in Phylo Objects

Description

The function (re-)establishes the standard numbering of terminal and internal nodes in phylogenies represented as objects of class phylo.

Usage

fixNodes(phy)

Arguments

phy

An object of class phylo.

Details

When reading phylogenetic trees from a NEXUS file that contains a translate section, it can happen that the terminal nodes (tips, leaves) of the corresponding phylo object are not numbered consecutively, which can be a problem in some downstream applications. You can use fixNodes to get the correct order of terminal node numbers.

fixNodes is also intended to re-establish the standard numbering of internal nodes and reorder all node value elements (e.g. node.label, posterior, ...) if a phylo object has been modified by either root, ladderize, or rotate.

Value

An object of class phylo.

Note

fixNodes has been completely rewritten for ips version 1.0-0. It should now run absolutely stable and is much quicker. Nevertheless, I recommend checking carefully the results of fixNodes, until the function has been tested by a number of users. Then this comment will be removed.

Author(s)

Christoph Heibl

See Also

read.tree, read.nexus, read.beast for reading trees in NEWICK and NEXUS format; ladderize and rotate for tree manipulation; node.support for plotting node support values has been moved to package viper.


ips documentation built on May 29, 2024, 4:39 a.m.