L2NND: Converting a table with speciation and extinction events to...

View source: R/edd_sim_utilities.R

L2NNDR Documentation

Converting a table with speciation and extinction events to nearest neighbor distances

Description

Function to convert a table with speciation and extinction events to phylogenetic distances between each species and its nearest neighbor on the tree

Usage

L2NND(L, t)

Arguments

L

Matrix of events as produced by edd_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

Simulation time

Value

a named vector of mean nearest neighbor distances

Author(s)

Tianjian Qin


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