Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After I upgrade my R version, how can I easily reinstall all the packages that were installed in the old version? [duplicate]

Possible Duplicate:
Painless way to install a new version of R?

In R, packages are not compatible across upgrades, and must be reinstalled. Is there any way to easily install the same set of packages in the new version as what I had installed in the old version?

Edit: I can't easily access the old version of R, since I upgrade via apt.

like image 526
Ryan C. Thompson Avatar asked Oct 20 '10 03:10

Ryan C. Thompson


People also ask

Do you need to reinstall packages after updating R?

On most single-user systems (Mac, Windows, and Linux), when you upgrade to a new minor version of R (like 3.3. 0 to 3.4. 0), R will not find the packages, you will need to reinstall your R packages. This is an inconvenience, but the problem is obvious and it is easy to fix.

Does updating RStudio remove packages?

The key thing to be aware of is that when you update R, if you just download the latest version from the website, you will lose all your packages. The easiest way to update R and not cause yourself a huge headache is to use the installr package.


1 Answers

I just posted a question with a possible solution:

update.packages(checkBuilt=TRUE, ask=FALSE) 

What about that doesn't work for you?

like image 184
Joshua Ulrich Avatar answered Nov 13 '22 00:11

Joshua Ulrich