sampFosRec: Function to sample fossil from a lineage.

Description Usage Arguments Value Examples

View source: R/sampFosRec.R

Description

A simple function that yields a 'fossil record' of a lineage. Frequently used in order to simulate fossil records for testing models, perform adequacy analyses or just for fun.

Usage

1
sampFosRec(orig, ext, samp)

Arguments

orig

time of origination of the lineage

ext

time of extinction of a lineage

samp

how fossils are sampled. If given as a number it is interpreted as a proper rate (with units fossils / unit time). Can also be given as a function of time taking argument (t). Note that t is in absolute terms and not from time of origin of the lineage.

Value

an array of times at which the lineage is sampled

Examples

1
2
Fos <- sampFosRec(orig = 2,ext = 12,samp = function(t){0.1+0.01*t})
Here a lineage originated at time 2 and went extinct at time 12 is sampled according to a linearly increasing samplin rate.

josteist/Compadre documentation built on June 3, 2021, 1:02 p.m.