Upgrade R Without Losing Your Packages
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Since the first publication of this post, a couple of packages have emerged to automate this process. The installr package for Windows and the updateR package for OS X are particularly good. However, this continues to be a popular post, so I have decided to keep it up. This work-flow is short, sweet, and cross-platform.
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.
If you had any packages from BioConductor, you will need to reload those as well.
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!
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.