I just posted a new version of the "phytools" package (here), v0.0-5. This version contains a few different updates.
1) I renamed the function min.split() to minSplit() and the function split.tree() to splitTree() to resolve generic/method inconsistencies. This is because R has generic functions min and split, but my functions don't comply with these generic methods. The renaming of splitTree() should not cause users any trouble, as this is called only from within posterior.evolrate(). Description of the use of min.split() can be found here and here; minSplit() works exactly the same way.
2) write.simmap() now writes to file in addition to a text string. It still only accepts modified "phylo" objects, and not "multiPhylo" lists of simmap trees; but allows for append=TRUE, which means that multiple simmap trees can be printed to file using a simple for() loop.
> x<-sim.char(tree,model.matrix=list(matrix(c(-1,1,1,-1),2,2)), model="discrete")[,,1]
> for(i in 1:length(mtrees)) write.simmap(mtrees[[i]],"testfile.trees",append=T)
3) Finally, I created a generic help page for "phytools":
Good luck - and please post feedback if you try this version.
Installed fine on my Windows machine! Thanks for adding a generic help page!ReplyDelete
Great. Thanks for the suggestion.ReplyDelete