Description Usage Arguments Value Author(s) See Also Examples
The functions is intended to manually change the height of internal nodes (i.e. changing the 'age of nodes'), e.g. to create a tree prior for Bayesian phylogeny estimation (BEAST, etc.).
1 | shiftNodeAge(phy, node, shift = NULL, age = NULL)
|
phy |
An object of class |
node |
An integer, the number of the internal node whose age is to be modified. |
shift |
A real number giving the age shift of |
age |
A real number giving the new age of |
An object of class "phylo"
Christoph Heibl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Phylogeny of bird orders:
data(bird.orders)
# Have a look at the phylogeny:
plot(bird.orders)
axisPhylo()
# Change age of node 42 ...
tr <- shiftNodeAge(bird.orders, 42, -15)
# ... plot again:
plot(tr)
axisPhylo()
# Alternatively, the result can be checked with 'compare.phylo':
compare.phylo(bird.orders, tr)
# Note that time shifts must not exceed the available
# branch length:
#tr <- shiftNodeAge(bird.orders, 42, +15)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.