get_phylogeny_crown_age: Obtain the crown age of a phylony

Description Usage Arguments Value Author(s) Examples

Description

Obtain the crown age of a phylony

Usage

1

Arguments

phylogeny

The phylogeny to obtain the crown age of

Value

the age of the phylogeny

Author(s)

Richel Bilderbeek

Examples

1
2
3
4
5
6
7
8
9
  age <- 15
  set.seed(42)
  phylogeny <- PBD::pbd_sim(
    c(0.2, 1, 0.2, 0.0, 0.0), age
  )$tree
  n_taxa <- length(phylogeny$tip.label)
  testit::assert(n_taxa > 0)
  crown_age <- get_phylogeny_crown_age(phylogeny)
  testit::assert(all.equal(age, crown_age, tolerance = 0.001))

richelbilderbeek/wiritttes documentation built on May 27, 2019, 8:14 a.m.