tree.grow | R Documentation |
Animates a birth-death tree simulation.
tree.grow(..., res=200, direction="rightwards", ladderize=TRUE)
... |
arguments to pass to |
res |
number of steps (the resolution of the animation). This also corresponds to the number of frames that will be created if the animation is to be converted to a .gif file. |
direction |
the direction to plot the tree. Only |
ladderize |
logical value indicating whether or not to 'ladderize' the plotted tree. (Defaults to |
This function simulates a birth-death tree under user-defined conditions and then creates an animation of that tree growing from left-to-right in the plotting device, or upwards.
An object of class "phylo"
.
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.
pbtree
## Not run:
## to create a .gif with ImageMagick installed
png(file="pbtree-
tree.grow(b=0.06,d=0.02,t=100)
dev.off()
system("ImageMagick convert -delay 5 -loop 0 *.png pbtree-anim.gif")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.