tree.age | R Documentation |
Extracting the age of each node and tip in a tree give the height of the tree or some specified age.
tree.age(tree, age, order = "past", fossil = TRUE, digits = 4)
tree |
A |
age |
The age of the tree. If missing the age is set to be the tree height. |
order |
Either "past" if the units express time since the present (e.g. million years ago), or "present" if the unit is expressed in time since the root. |
fossil |
|
digits |
A |
When fossil = TRUE
, if the tree
contains a tree$root.time
element (for tree's root age), and that order
is set to "past"
, the output ages are adjusted to be starting from the root.time. Else, if no tree$root.time
exists or fossil = FALSE
, tips and nodes age is relative from the tip furthest away from the root. THIS FUNCTION DOES NOT ESTIMATE TREE AGES, it just extracts branch length information and converts it into time units. For basic dating functions in R, check chronos
, chronopl
, chronoMPL
or use more specialised dating software (e.g. MrBayes, BEAST, RAxML, etc.).
Thomas Guillerme
slice.tree
, chrono.subsets
.
## A dated random phylogeny with a root 50 units of time old.
tree.age(rtree(10), age = 50)
## A random tree with the distance since the root.
tree.age(rtree(10), order = 'present')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.