date_nodes: Returns node ages for a time-scaled tree

Description Usage Arguments Details Author(s) Examples

View source: R/date_nodes.R

Description

Given a tree with branch-lengths scaled to time and a value for $root.time will return a vector of node ages.

Usage

1
date_nodes(time_tree)

Arguments

time_tree

A tree (phylo object) with branch lengths representing time and a value for $root.time.

Details

Returns a vector of node ages (terminal and internal) labelled by their node number.

Author(s)

Graeme T. Lloyd graemetlloyd@gmail.com

Examples

1
2
3
4
5
6
7
8
9
# Create simple four-taxon tree with edge lengths all
# set to 1 Ma:
time_tree <- ape::read.tree(text = "(A:1,(B:1,(C:1,D:1):1):1);")

# Set root.time as 10 Ma:
time_tree$root.time <- 10

# Get node ages:
date_nodes(time_tree = time_tree)

Claddis documentation built on Oct. 23, 2020, 8:04 p.m.