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
logical, whether to always consider the tree as containing at least one living taxa (TRUE) or allowing only fossil taxa (FALSE - default), see details.
digits
A numeric value or integer for the precision of the output.
Details
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.
# NOT RUN {## 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')
# }