waiting_times: Extract times to events from a phylogeny

View source: R/waiting_times.R

waiting_timesR Documentation

Extract times to events from a phylogeny

Description

Turns the phylogeny into a lineage-through-time table, and for which event computes the time to next event.

Usage

waiting_times(phylo)

Arguments

phylo

an object of the class phylo as introduced in ape. The phylogeny must start with the crown node (not stem), and be binary (no hard polytomies).#'

Value

a tibble with a row per event and four columns:

  • time, time of an event

  • N, number of species in the tree at that time

  • next_event, type of the next event; either "speciation" or "extinction"

  • waiting_time, time to the next event

  • is_speciation, lgl shortcut to type of event

Author(s)

Théo Pannetier


TheoPannetier/comrad documentation built on April 8, 2023, 8:06 a.m.