Simulating taxonomy and fossil data on phylogenetic trees under mechanistic models of speciation, preservation and sampling.
R package for simulating fossil data on phylogenetic trees under mechanistic models of preservation and sampling
The latest version can be installed in R using the package devtools:
Simulating data using
FossilSim can be as simple as the following code snippets.
# simulate a tree using apetips = 8t = ape::rtree(tips)# simulate fossils using fossilsimrate = 2f = sim.fossils.poisson(rate, t)# plot the outputplot(f, t)
# simulate taxonomy using fossilsimbeta = 0.5 # probability of symmetric speciationlambda.a = 0.1 # rate of anagenesiss = sim.taxonomy(t, beta, lambda.a)# plot the outputplot(s, t, legend.position = "bottomright")
The following vignettes are available via CRAN and provide detailed examples:
Walker Pett Joseph O'Reilly