sim.extant.samples: Include extant samples in the fossil object, with optional...

Description Usage Arguments Value Examples

View source: R/sim.tip.sampling.R

Description

Include extant samples in the fossil object, with optional rho sampling.

Usage

1
sim.extant.samples(fossils, tree = NULL, taxonomy = NULL, rho = 1, tol = NULL)

Arguments

fossils

Fossils object.

tree

Phylo object.

taxonomy

Taxonomy object.

rho

Extant species sampling probability.

tol

Rounding error tolerance for tip ages.

Value

An object of class fossils containing extant tip samples equal to the age of the tips (i.e. 0.0).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

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