Learn R Programming

Claddis (version 0.3.4)

GetNodeAges: Returns node ages for a time-scaled tree

Description

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

Usage

GetNodeAges(tree)

Arguments

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.

Examples

Run this code
# NOT RUN {
# Create simple four-taxon tree with edge lengths all
# set to 1 Ma:
tree <- read.tree(text="(A:1,(B:1,(C:1,D:1):1):1);")

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

# Get node ages:
GetNodeAges(tree)

# }

Run the code above in your browser using DataLab