View source: R/branch_lengths.R
rescale_branches | R Documentation |
Sets all branch lengths in a tree to the same length.
rescale_branches(phy, length = 1)
phy |
A phylo object, the tree to manipulate. |
length |
A numeric stating the branch length. |
By default, sets all branch lengths to 1.
A phylo object, the manipulated tree.
library(ape)
tree <- abridge_labels(get_glottolog_trees("Tangkic"))
tree2 <- clone_tip(tree, "nyan1300", n = 2, subgroup = TRUE)
plot_glotto(tree2)
tree3 <- rescale_branches(tree2)
plot_glotto(tree3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.