I just posted a
version of the phytools functin
This function is an interactive function for collapsing (& expanding)
subtrees on a phylogeny.
This version fixes two bugs in earlier versions. Firstly, prior versions
crashed if the user clicked on the root node (which is an attempt to collapse
the tree into a single node). This is still not permitted, but the result
is that nothing happens and a message is printed. Secondly, prior versions
also crashed under certain conditions when the tree was collapsed
into two tips. This is actually due to a bug in how the environmental
"last_plot.phylo" was created. This bug is now fixed
Since this function creates an animation there is no point in try to illustrate it here, but the following shows a video of it in use, with these bugs fixed. It also may seem smoother because it is being plotted user a faster machine than before.
This is also in a new non-CRAN version of phytools, and I am hoping to submit an update of phytools to CRAN soon.