View source: R/sim.tip.sampling.R
sim.extant.samples | R Documentation |
Include extant samples in the fossil object, with optional rho sampling.
sim.extant.samples(fossils, tree = NULL, taxonomy = NULL, rho = 1, tol = NULL)
fossils |
Fossils object. |
tree |
Phylo object. |
taxonomy |
Taxonomy object. |
rho |
Extant species sampling probability. |
tol |
Rounding error tolerance for tip ages. |
An object of class fossils containing extant tip samples equal to the age of the tips (i.e. 0.0).
# simulate tree lambda = 0.1 mu = 0.05 tips = 8 t = TreeSim::sim.bd.taxa(tips, 1, lambda, mu)[[1]] # simulate fossils f = sim.fossils.poisson(0.5, t) # simulate extant samples f = sim.extant.samples(f, t, rho = 0.5) plot(f, t)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.