fossils.to.paleotree.record: Transforms a fossils dataframe and either taxonomy or tree...

View source: R/conversions.R

fossils.to.paleotree.recordR Documentation

Transforms a fossils dataframe and either taxonomy or tree into a fossilRecordSimulation object from package paleotree.

Description

Transforms a fossils dataframe and either taxonomy or tree into a fossilRecordSimulation object from package paleotree.

Usage

fossils.to.paleotree.record(fossils, tree = NULL, taxonomy = NULL)

Arguments

fossils

fossils object

tree

phylo object containing the tree. If provided and taxonomy = NULL, all speciation is assumed symmetric

taxonomy

taxonomy object. If both tree and taxonomy are provided, only taxonomy will be used.

Value

The converted paleotree record

See Also

taxonomy, fossils, paleotree.record.to.fossils

Examples

# simulate tree
t = ape::rtree(6)
# simulate fossils using taxonomy
s = sim.taxonomy(t, 0.5, 1, 0.5)
f = sim.fossils.poisson(2, taxonomy = s)
# transform format
record = fossils.to.paleotree.record(f, taxonomy = s)

rachelwarnock/fossilsim documentation built on April 22, 2024, 3:21 p.m.