simBMphylo | R Documentation |
Simulates a discrete time phylogeny and Brownian motion trait, and generates a plot.
simBMphylo(n, t, sig2, plot=TRUE, ...)
## S3 method for class 'simBMphylo'
plot(x, ...)
n |
number of taxa to simulate in the output tree. |
t |
total time for the simulation. |
sig2 |
the rate of evolution under Brownian motion, |
plot |
optional logical value indicating whether or not the simulated object should be plotted. |
... |
optional arguments to be passed to the |
x |
in |
The function simulates a discrete-time pure-birth phylogeny (for fixed N and t using rejection sampling) and then discrete-time Brownian motion on that tree. It then proceeds to generating a plot of the results.
An object of class "simBMphylo"
or a plot.
Liam Revell liam.revell@umb.edu
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
bmPlot
, fastBM
, pbtree
set.seed(777)
simBMphylo(n=6,t=100,sig2=0.01)
## reset par to defaults
par(mfrow=c(1,1))
par(mar=c(5.1,4.1,4.1,2.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.