Discussion About Object-Oriented Design At Carl Boettiger’s Blog, Plus Notes On “Broken” Tutorials
A blessing and a curse of the R programming interface is that methods development occurs at a community scale. Progress tends to occur in a piecemeal fashion as developers make small advances within a massive, highly integrated, but often chaotically organized community. The great thing about R is that so many people are doing so many things in a modular framework that nearly any sort of analysis is possible. The drawback is that anytime there’s a flaw or a fundamental change in a given module (e.g., an R package, or a particular function), it can have widespread and unanticipated effects on any package that depends on it.
Over at his website/blog, Carl Boettiger points out that this problem is exacerbated by the fact that object-oriented design is rare in R, and as a result, changes in the underlying mechanics of functions tend to result in critical changes in the nature of their output, which spells trouble for dependencies. Carl does a nice job explaining how the use of object-oriented design can prevent such problems.
The context of Carl’s post is that the authors of the popular “geiger” R package have just released a major update that changes to many functions, function names, and outputs. According to Carl, most of these changes are great, but the rub is that several cause failures in packages, scripts, or tutorials that depend on “geiger”. These include Carl’s excellent “pmc” package, Travis Ingram‘s “surface” package, and perhaps most relevant to the Bodega crowd… several of our R phylogenetics tutorials! I’ve gotten several emails over the past week or so mentioning that these tutorials no longer work due to the “geiger” change.
If you’re interested in this sort of thing, check out Carl’s post, as well as the lengthy discussion it’s generated in his comments section. As for our tutorials, I’ll try to post new versions of the ones I wrote for continuous traits shortly. Most of the updates will be straightforward (thanks to Jeremy Brown for highlighting the necessary changes when he first wrote me about it), but those involving “pmc” will likely have to wait until Carl releases an update that’s compatible with the new “geiger”. Of course in the meantime, it should be possible to run the tutorials using older versions of “geiger”.