I just made a short video showing how to draw a tree “free-hand” in R
interactive=TRUE mode of the phytools function
The video is here:
The syntax for this exercise (in case it cannot be easily read from the video) is as follows:
## first load our packages: library(phytools) ## next create a two taxon tree that subtends the root: tree<-pbtree(n=2,tip.label=c("monkey","human")) ## now interactively bind the addt'l tips we want onto this tree: tips<-c("bonobo","chimp","gorilla","orangutan") for(i in 1:length(tips)) tree<-bind.tip(tree,tips[i],interactive=TRUE) ## strip edge lengths (here they were arbitrary): tree$edge.length<-NULL ## plot our tree: roundPhylogram(tree) ## done.
The objected created in memory is just a regular
class object, so it can be plotted:
written to file:
##  "(monkey,(((human,(bonobo,chimp)),gorilla),orangutan));"
In a subsequent post I will demonstrate how to add edge lengths based on divergence dates associated with individual nodes of the tree.