Quantcast
Channel: Phylogenetic Tools for Comparative Biology
Viewing all articles
Browse latest Browse all 802

New function to 'grow' birth-death tree in R

$
0
0

I just pusheda new update to phytools that rolls the phylogenetic animation that I illustrated in a recent blog plotinto a new function called tree.grow( ).

Here's how it works:

library(phytools)
packageVersion("phytools")
tree.grow(b=0.08,d=0.04,t=100)

That's pretty cool.

To export a .gif like the one shown above it is necessary to install the free sofware ImageMagick and add it to the system environment Path. Then one can just run (for instance):

png(file="pbtree-%03d.png",width=700,height=700,res=144)
tree.grow(b=0.08,d=0.04,t=100)
dev.off()
system("ImageMagick convert -delay 5 -loop 0 *.png pbtree-anim.gif")
file.remove(list.files(pattern=".png"))

Viewing all articles
Browse latest Browse all 802

Trending Articles