Other packages > Find by keyword >

TreeSim  

Simulating Phylogenetic Trees
View on CRAN: Click here


Download and install TreeSim package within the R console
Install from CRAN:
install.packages("TreeSim")

Install from Github:
library("remotes")
install_github("cran/TreeSim")

Install by package version:
library("remotes")
install_version("TreeSim", "2.4")



Attach the package and use:
library("TreeSim")
Maintained by
Tanja Stadler
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2010-02-23
Latest Update: 2019-04-08
Description:
Simulation methods for phylogenetic trees where (i) all tips are sampled at one time point or (ii) tips are sampled sequentially through time. (i) For sampling at one time point, simulations are performed under a constant rate birth-death process, conditioned on having a fixed number of final tips (sim.bd.taxa()), or a fixed age (sim.bd.age()), or a fixed age and number of tips (sim.bd.taxa.age()). When conditioning on the number of final tips, the method allows for shifts in rates and mass extinction events during the birth-death process (sim.rateshift.taxa()). The function sim.bd.age() (and sim.rateshift.taxa() without extinction) allow the speciation rate to change in a density-dependent way. The LTT plots of the simulations can be displayed using LTT.plot(), LTT.plot.gen() and LTT.average.root(). TreeSim further samples trees with n final tips from a set of trees generated by the common sampling algorithm stopping when a fixed number m>>n of tips is first reached (sim.gsa.taxa()). This latter method is appropriate for m-tip trees generated under a big class of models (details in the sim.gsa.taxa() man page). For incomplete phylogeny, the missing speciation events can be added through simulations (corsim()). (ii) sim.rateshifts.taxa() is generalized to sim.bdsky.stt() for serially sampled trees, where the trees are conditioned on either the number of sampled tips or the age. Furthermore, for a multitype-branching process with sequential sampling, trees on a fixed number of tips can be simulated using sim.bdtypes.stt.taxa(). This function further allows to simulate under epidemiological models with an exposed class. The function sim.genespeciestree() simulates coalescent gene trees within birth-death species trees, and sim.genetree() simulates coalescent gene trees.
How to cite:
Tanja Stadler (2010). TreeSim: Simulating Phylogenetic Trees. R package version 2.4, https://cran.r-project.org/web/packages/TreeSim. Accessed 16 Jul. 2026.
Previous versions and publish date:
(2026-07-09 08:28), 1.0 (2010-02-23 17:18), 1.1 (2011-03-20 20:39), 1.3 (2011-05-10 18:08), 1.4 (2011-06-15 19:53), 1.5 (2011-11-02 18:17), 1.6 (2012-08-05 19:54), 1.7 (2012-11-20 12:34), 1.8 (2013-04-16 18:14), 1.9.1 (2013-12-10 10:07), 1.9 (2013-06-09 19:08), 2.0 (2014-07-28 21:39), 2.1 (2014-09-18 17:22), 2.2 (2015-10-05 17:07), 2.3 (2017-03-20 11:52)
Other packages that cited TreeSim R package
View TreeSim citation profile
Other R packages that TreeSim depends, imports, suggests or enhances
Complete documentation for TreeSim
Functions, R codes and Examples using the TreeSim R package
Some associated functions: LTT.plot.gen . LTT.plot . TreeSim-package . corsim . cuttree . getx . sim.bd.age . sim.bd.taxa.age . sim.bd.taxa . sim.bdsky.stt . sim.bdtypes.stt.taxa . sim.genespeciestree . sim.genetree . sim.gsa.taxa . sim.rateshift.taxa . 
Some associated R codes: LTT.average.root.R . LTT.general.R . LTT.plot.R . LTT.plot.gen.R . add.rootedge.R . age.nodes.R . age.tips.R . branching.times.complete.R . collapse.singles.R . corsim.R . cuttree.R . extinction.times.R . gamStat.R . get.times.polytomy.R . getnumbs.R . gettimelength.R . gettimeperiod.R . getx.R . intp1.R . numbspecies.R . reconstructed.age.R . reconstructed.taxa.R . reconstructed.taxa.single.R . sim.bd.age.R . sim.bd.age.help.R . sim.bd.age.loop.R . sim.bd.taxa.R . sim.bd.taxa.age.R . sim.bd.taxa.age.help.R . sim.bd.taxa.age.loop.R . sim.bd.taxa.help.R . sim.bd.taxa.loop.R . sim.bdsky.stt.R . sim.bdtypes.stt.taxa.R . sim.genespeciestree.R . sim.genetree.R . sim.gsa.taxa.R . sim.rateshift.taxa.R . sim.rateshift.taxa.help.R . sim.rateshift.taxa.loop.R . sim2.bd.R . sim2.bd.age.R . sim2.bd.fast.R . sim2.bd.fast.age.R . sim2.bd.fast.single.R . sim2.bd.fast.single.mrca.R . sim2.bd.fast.single.origin.R . sim2.bd.gsa.R . sim2.bd.mrca.R . sim2.bd.mrca.reconst.R . sim2.bd.origin.R . sim2.bd.rateshift.R . sim2.bd.rateshift.single.R . sim2.bd.reverse.R . sim2.bd.reverse.single.R . sim2.bd.ssa.R . sim2.gsa.R . stats.R .  Full TreeSim package functions and examples
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

bbdetection  
Identification of Bull and Bear States of the Market
Implements two algorithms of detecting Bull and Bear markets in stock prices: the algorithm of Pagan ...
Download / Learn more Package Citations See dependency  
nextGenShinyApps  
Craft Exceptional 'R Shiny' Applications and Dashboards with Novel Responsive Tools
Nove responsive tools for designing and developing 'Shiny' dashboards and applications. The scripts ...
Download / Learn more Package Citations See dependency  
tarchetypes  
Archetypes for Targets
Function-oriented Make-like declarative pipelines for Statistics and data science are supported in t ...
Download / Learn more Package Citations See dependency  
Rnmr1D  
Perform the Complete Processing of a Set of Proton Nuclear Magnetic Resonance Spectra
Perform the complete processing of a set of proton nuclear magnetic resonance spectra from the free ...
Download / Learn more Package Citations See dependency  
wordnet  
WordNet Interface
An interface to WordNet using the Jawbone Java API to WordNet. WordNet (< ...
Download / Learn more Package Citations See dependency  
stevedata  
Steve's Toy Data for Teaching About a Variety of Methodological, Social, and Political Topics
This is a collection of various kinds of data with broad uses for teaching. My students, and academ ...
Download / Learn more Package Citations See dependency  

27,806

R Packages

239,283

Dependencies

73,837

Author Associations

27,807

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA