
reposition
is a helper function used for manually creating
"dendrogram"
objects from nested lists. The function
recursively reassigns the 'height' attributes at each node by
a given constant.
reposition(x, shift = "reset")
an object of class "dendrogram"
.
either the character string "reset" (shift the graph so that the height of the farthest leaf from the root is zero), or a numeric value giving the amount to shift the graph along the primary axis.
Returns an object of class "dendrogram"
.
# NOT RUN {
x <- read.dendrogram(text = "(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);")
plot(x, horiz = TRUE)
x <- reposition(x)
plot(x, horiz = TRUE)
# }
Run the code above in your browser using DataLab