rotateNodes {phytools}R Documentation

Rotates a node or set of nodes in a phylogenetic tree

Description

This function is a wrapper for rotate which rotates a set of nodes or all nodes.

Usage

rotateNodes(tree, nodes, polytom=c(1,2), ...)

Arguments

tree

object of class "phylo".

nodes

either a single node number to rotate, a vector of node numbers, or the string "all".

polytom

a vector of mode numeric and length two specifying the two clades that should be exchanged in a polytomy (see rotate).

...

optional arguments.

Details

Also addresses the problem that the product of multiple rotations from rotate can be non-compliant with the implicit "phylo" standard because the tip numbers in tree$edge are not in numerical order 1:n for n tips.

Value

An object of class "phylo" (i.e., a phylogenetic tree).

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.


[Package phytools version 0.4-60 Index]