Should I update all my R packages frequently? Yes/No? Why?

As for concrete numbers, I’d guess I update every week or so. I wouldn’t look askance at updating every month or so. If it’s been 6 months to a year for someone who uses R daily, I’d expect a good reason (and they do exist).

As an example of a good reason, my facility is under strict configuration control procedures. Given the toxicity of what we work with (and the nature of the public to freak out about mistakes) we won't tolerate anything unexpected happening due to a casual library update. To update my library requires the following steps:

  • submitting an IT request and getting it approved
  • updating the library in a development environment
  • Testing every report and application we use in production in the development environment and looking for new warnings, messages, and errors. (Sometimes, updating a package requires changes the CSS on an app, which doesn't get picked up by any of those)
  • Once I'm happy with the behavior in the development environment, I load the new library into a testing environment where a group of end users tests everything to verify that it still functions to specification
  • The Quality department reviews all of the changes and verifies that all of the updates I've made are properly documented and installed.
  • Finally, I may release the new library into the production environment.

This is a bit of a painful process, so I only do it if I am upgrading R itself. The last time I upgraded R and the library, it was a month long process.

Incrementally, I may update a package (and sometimes dependencies) when I need a new feature. Updating a single package requires the same process, but is much less painful, since I'm usually only testing one feature at a time.

On the other hand, when I do my own personal package development, or when I've taught R classes, I always update to the most recent version of R and update all the packages.

8 Likes