Learn R Programming

FossilSim (version 2.4.1)

sim.fbd.taxa: sim.fbd.taxa: Simulating fossilized birth-death trees on a fixed number of extant taxa.

Description

sim.fbd.taxa: Simulating fossilized birth-death trees on a fixed number of extant taxa.

Usage

sim.fbd.taxa(n, numbsim, lambda, mu, psi, frac = 1, complete = FALSE)

Value

List of numbsim simulated SAtrees with n extant sampled tips.

Arguments

n

Number of extant sampled tips.

numbsim

Number of trees to simulate.

lambda

Speciation rate.

mu

Extinction rate.

psi

Fossil sampling rate.

frac

Extant sampling fraction. When complete = FALSE, the actual (simulated) number of extant tips is n/frac, but only n tips are included in the result (incomplete sampling). When complete = TRUE: all unsampled lineages are included, i.e. the final tree has n/frac extant tips.

complete

whether to return the complete tree (with non-sampled lineages) or the reconstructed tree (with unsampled lineages removed).

Examples

Run this code
n = 10
lambda = 2.0
mu = 0.5
psi = 0.6
numbsim = 2
if (requireNamespace("TreeSim", quietly = TRUE)) {
sim.fbd.taxa(n, numbsim, lambda, mu, psi)
}

Run the code above in your browser using DataLab