| ladder {phylogram} | R Documentation |
Reorder tree branches in ladderized pattern.
Description
This function ladderizes the branches of a dendrogram object
to aid in visual interpretation.
Usage
ladder(x, decreasing = FALSE)
Arguments
x |
an object of class |
decreasing |
logical indicating whether the tree should be ladderized upwards or downwards. Defaults to FALSE (downwards). |
Details
This function is the dendrogram analogue of the
ladderize function in the ape
package (Paradis et al 2004, 2012).
Value
Returns an object of class dendrogram.
Author(s)
Shaun Wilkinson
References
Paradis E, Claude J, Strimmer K, (2004) APE: analyses of phylogenetics and evolution in R language. Bioinformatics 20, 289-290.
Paradis E (2012) Analysis of Phylogenetics and Evolution with R (Second Edition). Springer, New York.
See Also
The ladderize function in the
ape package performs a similar operation for objects
of class "phylo".
Examples
x <- read.dendrogram(text = "(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);")
plot(x, horiz = TRUE)
x <- ladder(x, decreasing = TRUE)
plot(x, horiz = TRUE)
[Package phylogram version 2.1.0 Index]