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 26 Aug. 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

PCADSC  
Tools for Principal Component Analysis-Based Data Structure Comparisons
A suite of non-parametric, visual tools for assessing differences in data structures for two datase ...
Download / Learn more Package Citations See dependency  
clinUtils  
General Utility Functions for Analysis of Clinical Data
Utility functions to facilitate the import, the reporting and analysis of clinical data. Example ...
Download / Learn more Package Citations See dependency  
ncodeR  
Techniques for Automated Classifiers
A set of techniques that can be used to develop, validate, and implement automated classifiers. A po ...
Download / Learn more Package Citations See dependency  
SelvarMix  
Regularization for Variable Selection in Model-Based Clustering and Discriminant Analysis
Performs a regularization approach to variable selection in themodel-based clustering and classifica ...
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  
RCytoGPS  
Using Cytogenetics Data in R
Defines classes and methods to process text-based cytogenetics using the CytoGPS web site, then imp ...
Download / Learn more Package Citations See dependency  

28,332

R Packages

239,283

Dependencies

75,113

Author Associations

28,333

Publication Badges

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