ladder: Reorder tree branches in ladderized pattern.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ladder.R

Description

This function ladderizes the branches of a dendrogram object to aid in visual interpretation.

Usage

1
ladder(x, decreasing = FALSE)

Arguments

x

an object of class "dendrogram".

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

1
2
3
4
  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)

shaunpwilkinson/phylogram documentation built on Dec. 11, 2019, 11:36 p.m.