L2Phi_cpp: C++ version of L2Phi #' @description Function to convert a...

View source: R/edd_sim_utilities.R

L2Phi_cppR Documentation

C++ version of L2Phi #' @description Function to convert a table with speciation and extinction events to a phylogenetic diversity metric

Description

C++ version of L2Phi #' @description Function to convert a table with speciation and extinction events to a phylogenetic diversity metric

Usage

L2Phi_cpp(L, t, metric)

Arguments

L

Matrix of events as produced by pdd_sim:

- the first column is the time at which a species is born in Mya
- the second column is the label of the parent of the species; positive and negative values indicate whether the species belongs to the left or right crown lineage
- the third column is the label of the daughter species itself; positive and negative values indicate whether the species belongs to the left or right crown lineage
- the fourth column is the time of extinction of the species; if the fourth element equals -1, then the species is still extant.

t

Sets whether the phylogeny should drop species that are extinct at the present

metric

Specifies which phylogenetic diversity metric should be used

Value

a value of one of the phylogenetic diversity metrices

Author(s)

Tianjian Qin


EvoLandEco/eve documentation built on Sept. 14, 2024, 12:04 a.m.