paleotree.record.to.fossils: Transforms a fossilRecordSimulation object from package...

View source: R/conversions.R

paleotree.record.to.fossilsR Documentation

Transforms a fossilRecordSimulation object from package paleotree to a tree and taxonomy and fossils objects.

Description

The returned tree is in paleotree format, with zero-length edges leading to tips at bifurcation and anagenetic events. Fossils and taxonomy are only specified on non-zero-length edges. The label assigned to the parent of the origin or root will be zero.

Usage

paleotree.record.to.fossils(record)

Arguments

record

fossilRecordSimulation object.

Value

A list containing the converted tree, taxonomy and fossils

See Also

taxonomy, fossils, fossils.to.paleotree.record

Examples

if (requireNamespace("paleotree", quietly = TRUE)) {
# simulate record
record = paleotree::simFossilRecord(p=0.1, q=0.1,r=0.1, nruns=1, nTotalTaxa=c(30,40),
    nExtant=0, nSamp = c(5,25))

# transform format
l_tf = paleotree.record.to.fossils(record)
l_tf$tree
l_tf$taxonomy
l_tf$fossils
}


FossilSim documentation built on Oct. 3, 2024, 1:07 a.m.