Learn R Programming

phytools (version 0.7-20)

untangle: Attempts to untangle crossing branches for plotting

Description

This function attempts to untangle the branches of a tree that are tangled in plotting with plot.phylo, plotTree, or plotSimmap.

Usage

untangle(tree, method=c("reorder","read.tree"))

Arguments

tree

tree as an object of class "phylo" or "simmap".

method

method to use to attempt to untangle branches. method="reorder" uses two calls of reorder.phylo or reorderSimmap; method="read.tree" writes the tree to a text string and then reads it back into memory using read.tree.

Value

An object of class "phylo" or "simmap".

References

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