Best practices for updating a package to use a new version of R

I have a nascent package developed in R 3.6.3. I'd like to test it for compatibility with R 4.0+. Is there a best practice for doing this (and then implementing upgrades as necessary) or do I just install it in an environment using the newer version of R and see what breaks? I don't mind the latter but I've seen so many helpful "Best Practices for doing X in R" books and articles around that I thought there might be something similar for this scenario. Unfortunately the textual similarity of this question to "how do I update all my R packages etc" has only brought up answers to the latter.

Yes, one option is to install it on a newer R version. A tool like GitHub - r-lib/rig: The R Installation Manager could help installing multiple R versions. Depending on your OS, installing multiple versions at the same time may be easy or hard, our rig tool may help, nevertheless.

Another option is to use a CI service, this will help make sure that your package keeps working on all R versions you support. See e.g. this recent blog post of ours: GitHub Actions for R developers, v2

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.