build_spp_tbl: Extracts phylogenetic information from a 'comrad' simulation

View source: R/build_spp_tbl.R

build_spp_tblR Documentation

Extracts phylogenetic information from a comrad simulation

Description

Reads the output of a comrad simulation and creates a table containing the necessary information about every species to make a phylogeny.

Usage

build_spp_tbl(comrad_tbl)

Arguments

comrad_tbl

a tibble containing the output of a comrad simulation, as produced by run_simulation() or read by read_comrad_tbl().

Value

a tibble with four columns and a row per species in the simulation

  • species_name, name of the species

  • ancestor_name, name of the ancestral species from which it branched. NA for the initial species.

  • time_birth, the generation at which the species appeared.

  • time_death, the generation at which the last individual died. Last generation if the species was still extant at the end of the simulation.

Author(s)

Théo Pannetier


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