Yup kids, it’s that time again. The new version of R was just released. In the past I’ve hesitated to upgrade my R version because I knew I would lose all of my packages during the new install, which makes me very grumpy.
I found this neat little trick to save my current packages before the new install and re-load them into the new version. I did this on Mac Yosemite but I this should work on Windows or Linux as well.
1. Before you upgrade, build a temp file with all of your old packages.
2. Install the new version of R and let it do it’s thing.
3. Once you’ve got the new version up and running, reload the saved packages and re-install them from CRAN.
Note: If you had any packages from BioConductor, you can update those too!
source("http://bioconductor.org/biocLite.R") chooseBioCmirror() biocLite() load("installed_old.rda") tmp
All done, now you can get back to cracking out R code. This method helped me save a lot of time, hope someone else finds it useful!