prune.fossils: Removes all intermediate fossils from a combined tree and...

Description Usage Arguments Value Examples

View source: R/conversions.R

Description

Removes all intermediate fossils from a combined tree and labels the first and last fossils of each lineage. Can be used with sampled or complete trees. If only one fossil is present for a particular species it is labelled as first.

Usage

1

Arguments

tree

Combined tree with fossils.

Value

Tree with pruned fossils.

Examples

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

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

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

# prune fossils
t4 = prune.fossils(t2)

# or transform to sampled tree first
t3 = sampled.tree.from.combined(t2)
t4 = prune.fossils(t3)
plot(t4)

FossilSim documentation built on May 1, 2019, 10:52 p.m.