Description Usage Arguments Details References Examples
Return a tree with gravity changed by factor.
1 | reGravitise(tree, factor)
|
tree |
phylogenetic tree (ape class) |
factor |
proportion (-1 to +1) by which gravity is changed, positive values increase gravity, negative values decrease it. |
The functions works by adding and removing branch length between parent and child branches. The amount by which the branch lengths are changed is determined by factor.
No references yet! https://github.com/DomBennett/MoreTreeTools.
1 2 3 4 5 6 7 8 9 10 11 | # Create balanced tree, plot positively and negatively reGravitised
n <- 16
par (mfrow = c (3, 1), mar = c (1, 1, 1, 1))
tree <- compute.brlen (stree (n, 'balanced'))
tree$root.edge <- 0.1 # add a root edge
plot (tree, show.tip.label=FALSE, edge.width=2, root.edge=TRUE,
main='Original')
plot (reGravitise (tree, factor = -0.9), show.tip.label=FALSE,
edge.width=2, root.edge=TRUE, main='Reduced gravity')
plot (reGravitise (tree, factor = 0.9), show.tip.label=FALSE,
edge.width=2, root.edge=TRUE, main='Increased gravity')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.