I just posted a version of the function
that permits the user to automatically overlay the phylogeny on a lineage
through time plot. I wrote about how to do this manually in a
post. This update is part of a new version of phytools,
which has been submitted to CRAN - but for now can also be downloaded and
installed from source from the phytools
Here is a demo of how it works:
##  '0.4.60'
tree<-pbtree(n=26,tip.label=LETTERS) ## simulated tree: plotTree(tree)
obj<-ltt(tree,plot=FALSE) ## object of class "ltt" obj
## Object of class "ltt" containing: ## ## (1) A phylogenetic tree with 26 tips and 25 internal nodes. ## ## (2) Vectors containing the number of lineages (ltt) and branching times (times) on the tree. ## ## (3) A value for Pybus & Harvey's "gamma" statistic of -1.0815, p-value = 0.2795.
## regular ltt plot plot(obj)
## overlay tree on plot plot(obj,show.tree=TRUE)
That's all there is to it. At present I don't have it set up to change the color of the tree - however, there is an option to increase or decrease the transparency:
That's it for now. Stay tuned for another post detailing the updates in the latest phytools version.
Post a Comment
Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.