sampled.tree.from.combined {FossilSim} | R Documentation |
Removes all unsampled lineages from a combined tree. Extinct tips are only sampled if they are fossils. With default settings all extant tips are sampled.
Description
Removes all unsampled lineages from a combined tree. Extinct tips are only sampled if they are fossils. With default settings all extant tips are sampled.
Usage
sampled.tree.from.combined(tree, rho = 1, sampled_tips = NULL)
Arguments
tree |
Combined tree with fossils. |
rho |
Sampling probability of extant tips. Default 1, will be disregarded if sampled_tips is not null. |
sampled_tips |
List of tip labels corresponding to sampled extant tips. |
Value
Sampled tree with fossils.
Examples
# simulate tree
t = ape::rtree(6)
# simulate fossils
f = sim.fossils.poisson(rate = 2, tree = t)
# transform format
t2 = SAtree.from.fossils(t,f)$tree
# transform to sampled tree
t3 = sampled.tree.from.combined(t2)
plot(t3)
[Package FossilSim version 2.3.3 Index]