getAge: Get age of node or edge

Description Usage Arguments Details References Examples

Description

Return data.frame of age of tip, internal node or age range of an edge (so long as the tree provided is time calibrated with branch lengths).

Usage

1
getAge(tree, node = "all", edge = NULL)

Arguments

tree

phylogenetic tree (ape class)

node

number(s) indicating node(s) (default 'all')

edge

number(s) indicating edge(s) (default NULL)

Details

First calculates the root to tip distance, then calculates node age by subtracting this distance from the root to node distance. If tree provided is not ultrametric, root to tip distance is the distance from the root to the most distal tip. If edge provided returns the max and min age of each node of edge. If node equals 'all', will return a dataframe for all nodes.

References

No references yet! https://github.com/DomBennett/MoreTreeTools.

Examples

1
2
3
4
data ('catarrhines')
# when did humans and chimps split?
node <- getParent (catarrhines, tips=c ('Homo sapiens', 'Pan troglodytes'))
(getAge (catarrhines, node=node))  # 9.7MYA according to this tree

DomBennett/MoreTreeTools documentation built on May 6, 2019, 2:51 p.m.