attachment.times: Identify asymmetric attachment ages and extinction times in...

Description Usage Arguments Value Examples

View source: R/attachment.times.R

Description

The age at which a species attaches to a tree may not be equivalent to the time of origin of a species if sampling is incomplete. This function takes an object of class fossils and the corresponding phylo object and calculates the speciation (= attachment) times taking into account incomplete sampling. The function assumes all speciation events are asymmetric (budding). If the fossil object does not represent asymmetric species, the function converts species to asymmetric using the corresponding tree.

Usage

1
attachment.times(tree, fossils)

Arguments

tree

Phylo object.

fossils

Fossils object.

Value

Dataframe containing the speciation & extinction times in an incompletely sampled tree.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# simulate tree
t = ape::rtree(6)

# simulate fossils
f = FossilSim::sim.fossils.poisson(2, t)

# add extant samples
f = FossilSim::sim.extant.samples(f, t, rho = 0.5)

# calculate attachment times
attachment.times(t, f)

rachelwarnock/fbdR documentation built on Aug. 23, 2019, 3:39 a.m.