reconstructed.tree.fossils.objects: Returns tree and fossil objects that you can use to plot the...

Description Usage Arguments Value Examples

View source: R/conversions.R

Description

Note that for datasets containing extinct only samples (& rho = 0) the ages output are scaled so that the youngest sample = 0.

Usage

1

Arguments

fossils

Fossils object.

tree

Tree object.

rho

Extant species sampling probability. Default = 1, will be disregarded if fossils object already contains extant samples.

Value

A list containing the tree and fossil objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# simulate tree
birth = 0.1
death = 0.05
tips = 10
t = TreeSim::sim.bd.taxa(tips, 1, birth, death)[[1]]

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

# simulate extant samples
f = sim.extant.samples(f, tree = t, rho = 0.5)

# plot the complete tree
plot(f,t)

# generate tree & fossil objects corresponding to the reconstructed tree
out = reconstructed.tree.fossils.objects(f, t)
f.reconst = out$fossils
t.reconst = out$tree

# plot the reconstructed tree
plot(f.reconst, t.reconst)

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