Learn R Programming

FossilSim (version 2.4.1)

paleotree.record.to.fossils: 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)

Value

A list containing the converted tree, taxonomy and fossils

Arguments

record

fossilRecordSimulation object.

See Also

taxonomy, fossils, fossils.to.paleotree.record

Examples

Run this code
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
}

Run the code above in your browser using DataLab