sampled.tree.from.combined: Removes all unsampled lineages from a combined tree. Extinct...

Description Usage Arguments Value Examples

View source: R/conversions.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# simulate tree
t = ape::rtree(6)

# simulate fossils
f = sim.fossils.poisson(rate = 2, tree = t)

# transform format
t2 = SAtree.from.fossils(t,f)

# transform to sampled tree
t3 = sampled.tree.from.combined(t2)
plot(t3)

FossilSim documentation built on April 6, 2021, 1:06 a.m.