R package for simulating fossil data on phylogenetic trees undermechanistic models of preservation and sampling
The latest version can be installed in R using the packagedevtools:
install.packages("BiocManager")BiocManager::install("ggtree")library(devtools)install_github("fossilsim/fossilsim")Simulating data usingFossilSim can be as simple as thefollowing code snippets.
# simulate a tree using apetips = 8t = ape::rtree(tips)# simulate fossils using fossilsimrate = 2f = sim.fossils.poisson(rate, t) # plot the complete outputplot(f, t)# plot the reconstructed outputplot(f, t, reconstructed = TRUE)# 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 detailedexamples:
Joëlle Barido-Sottani et al. 2019.Methods Evolution &Ecology.FossilSim:an R package for simulating fossil occurrence data under mechanisticmodels of preservation and recovery