Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RenumberTips

Renumber a tree's tips


Description

RenumberTips(tree, tipOrder) sorts the tips of a phylogenetic tree tree such that the indices in tree$edge[, 2] correspond to the order of leaves given in tipOrder.

Usage

RenumberTips(tree, tipOrder)

## S3 method for class 'phylo'
RenumberTips(tree, tipOrder)

## S3 method for class 'multiPhylo'
RenumberTips(tree, tipOrder)

## S3 method for class 'list'
RenumberTips(tree, tipOrder)

Arguments

tree

A tree of class phylo.

tipOrder

A character vector containing the values of tree$tip.label in the desired sort order, or an object (perhaps of class phylo or Splits) with tip labels.

Value

RenumberTips() returns tree, with the tips' internal representation numbered to match tipOrder.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

See Also

Examples

data('Lobo') # Loads the phyDat object Lobo.phy
tree <- RandomTree(Lobo.phy)
tree <- RenumberTips(tree, names(Lobo.phy))

TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.