convert_tree2brts: Convert a tree into branching times

View source: R/utils.R

convert_tree2brtsR Documentation

Convert a tree into branching times

Description

Convert a tree into branching times. Differently from the branching.times function in ape, it will keep the multiple events. Since the units are million years, a precision of 8 means that the approximation goes up to the 8-th digits. With such approximation we consider events happening within an interval of 4 days (1 million years / 10^8 = 1 year / 100) as simultaneous.

Usage

convert_tree2brts(tree, precision = 8)

Arguments

tree

an ultrametric phylogenetic tree of class phylo

precision

define the precision of the approximation.

Value

the branching times

Author(s)

Giovanni Laudanno, Richèl J.C. Bilderbeek

Examples

phylogeny <- ape::read.tree(text = "((A:2, B:2):1, C:3);")

# c(3.0, 2.0)
convert_tree2brts(phylogeny)

richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.