sim.tip.samples: Include extant and extinct tip samples in the fossil object,...

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

sim.tip.samplesR Documentation

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)

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.

Value

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

Examples

# 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)


fossilsim/fossilsim documentation built on April 23, 2024, 3:16 p.m.