Learn R Programming

FossilSim (version 2.4.1)

sim.tip.samples: Include extant and extinct tip samples in the fossil object, with optional rho sampling.

Description

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

Usage

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

Value

An object of class fossils containing extant or extinct tip samples equal to the age of the tips.

Arguments

fossils

Fossils object.

tree

Phylo object.

taxonomy

Taxonomy object.

rho

Tip sampling probability. Can be a single value or a vector. Vector entries will be applied to extant tips in the order in which they appear in the taxonomy object.

Examples

Run this code
# simulate tree
t = ape::rtree(6)

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

# simulate tip samples
f = sim.tip.samples(f, t, rho = 0.5)
plot(f, t)

Run the code above in your browser using DataLab