Description Usage Arguments Value Examples
View source: R/attachment.times.R
The age at which a species attaches to a tree may not be equivalent to the time of origin of a species if sampling is incomplete. This function takes an object of class fossils and the corresponding phylo object and calculates the speciation (= attachment) times taking into account incomplete sampling. The function assumes all speciation events are asymmetric (budding). If the fossil object does not represent asymmetric species, the function converts species to asymmetric using the corresponding tree.
1 | attachment.times(tree, fossils)
|
tree |
Phylo object. |
fossils |
Fossils object. |
Dataframe containing the speciation & extinction times in an incompletely sampled tree.
1 2 3 4 5 6 7 8 9 10 11 | # simulate tree
t = ape::rtree(6)
# simulate fossils
f = FossilSim::sim.fossils.poisson(2, t)
# add extant samples
f = FossilSim::sim.extant.samples(f, t, rho = 0.5)
# calculate attachment times
attachment.times(t, f)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.