I realized the other day that I had inadvertently programmed two different functions in phytools that do exactly the same thing. This was bound to happen as phytools has grown into a pretty substantial endeavor with well over 100 different functions & methods.
Specifically, the phytools function
repPhylo (originally described
is exactly equivalent (although derived independently) to phytools S3
methods for objects of class
(added about a year later,
I have now removed this redundancy, although
repPhylo still exists
as a valid alias for
Here's a quick & dirty demo of how these methods work in the latest version of phytools (not yet on CRAN):
## Loading required package: ape ## Loading required package: maps
##  '0.4.36'
## simulate tree tree<-pbtree(n=26,tip.label=LETTERS) ## S3 method rep for objects of class "phylo" trees<-rep(tree,4) par(mfrow=c(2,2)) plotTree(trees)
## simulate trees trees<-pbtree(n=12,tip.label=LETTERS[1:12],nsim=3) ## S3 method rep for object of class "multiPhylo" trees<-rep(trees,2) par(mfrow=c(2,3)) plotTree(trees)
Post a Comment
Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.