simulateTree | R Documentation |
simulateTree
uses a birth-death process to simulate a phylogenetic
tree, following the format of ape
package's phylo
object. The
function is basically a wrapper for the diversitree
's tree.bd
function.
simulateTree(
pars,
max.taxa = Inf,
max.t,
min.taxa = 2,
include.extinct = FALSE
)
pars |
|
max.taxa |
Maximum number of taxa to include in the tree. If
|
max.t |
Maximum length to evolve the phylogeny over. If equal to
|
min.taxa |
Minimum number of taxa to include in the tree. |
include.extinct |
A |
see help page from diversitree::tree.bd
A phylo
object
Daniel Rabosky, Matheus Januario, Jennifer Auler
Paradis, E. (2012). Analysis of Phylogenetics and Evolution with R (Vol. 2). New York: Springer.
Popescu, A. A., Huber, K. T., & Paradis, E. (2012). ape 3.0: New tools for distance-based phylogenetics and evolutionary analysis in R. Bioinformatics, 28(11), 1536-1537.
FitzJohn, R. G. (2010). Analysing diversification with diversitree. R Packag. ver, 9-2.
FitzJohn, R. G. (2012). Diversitree: comparative phylogenetic analyses of diversification in R. Methods in Ecology and Evolution, 3(6), 1084-1092.
S <- 1
E <- 0
set.seed(1)
phy <- simulateTree(pars = c(S, E), max.taxa = 6, max.t=Inf)
ape::plot.phylo(phy)
ape::axisPhylo()
# alternatively, we can stop the simulation using time:
set.seed(42)
phy2 <- simulateTree(pars = c(S, E), max.t=7)
ape::plot.phylo(phy2)
ape::axisPhylo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.