paleotree.record.to.fossils {FossilSim} | R 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, alphanumeric = TRUE)
Arguments
record |
fossilRecordSimulation object. |
alphanumeric |
If TRUE function will return alphanumeric species labels (i.e. species labels contain the "t" prefix) (default). If FALSE function will return numeric only species labels. |
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
}
[Package FossilSim version 2.3.3 Index]