Updating R and RStudio

Jul 19, 2021 R

When do I update R and RStudio?

Before the start of each semester I look for the latest versions of R and RStudio. To do this, I go to CRAN and in the RStudio IDE (RStudio’s pointy-and-clicky software is called an Integrated Development Environment), from the Help menu, I choose Check for Updates. Because of its relatively solid history, I will install a new version of the RStudio IDE the day it is released. For R, I look to see if the last update was a major, minor or patch release. That is, if there was a change in the first digit, second digit or third digit of the MAJOR.MINOR.PATCH version number. For major releases, I try to wait a couple weeks and/or until there has been at least one patch release. I want version 4.0.1 instead of 4.0.0. That delay is as much about wanting to make sure that package developers have had time to take advantage of new features as fear of new bugs. I will grab minor releases and patch releases if they are at least a week old.

Should I delete the old version?

I do not uninstall my old versions of R. There are good tools, like the renv package, to help keep track of different versions of R packages but not everybody uses them. So it is convenient for me to shift to an old R build if somebody reports “it used to work.” Check my post on changing between versions for more advice on updating.

When do I update packages?

I check for package updates often. When things are not crazy I probably update my packages every couple weeks. I use the update button on the packages tab in the bottom right corner of the RStudio IDE. Image of the Update button in the RStudio IDE

Be sure to read the News for each package.

image of update window with arrow pointing to news

Look for anything marked as a “Breaking” change. Breaking changes are modifications that are known to cause problems for old code. If you see a breaking change (especially in any of the functions you use) don’t update the package before you have time to adjust your old code.