Learn R Programming

FossilSim (version 2.4.1)

reconcile.fossils.taxonomy: Reconcile existing fossil and taxonomy objects

Description

This function uses edge identifiers (edge) and fossil sampling times (hmin) to reassign fossil species identifiers (sp, origin) using an existing taxonomy object. It can only be used if exact fossil sampling times are known (i.e. hmin = hmax), otherwise edges containing multiple species may be indistinguishable.

Usage

reconcile.fossils.taxonomy(fossils, taxonomy)

Value

An object of class fossils.

Arguments

fossils

Fossils object.

taxonomy

Taxonomy object.

Examples

Run this code
# simulate tree
t = ape::rtree(6)

# simulate fossils using the tree
rate = 2
f = sim.fossils.poisson(rate, tree = t)
plot(f, t)

# simulate fossils using taxonomy
s = sim.taxonomy(t, 0.5, 1, 0.5)
f = reconcile.fossils.taxonomy(f, s)
plot(f, t)

Run the code above in your browser using DataLab