Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it good practice to update R packages often? [closed]

Tags:

r

I've started to use R a little while ago and am not sure how often to update the installed packages (at this time, I'm using mostly ggplot2 and rattle). One one hand it's the typical geek impulse to have the latest version :-) On the other, updates can break functionality and, as an R beginner, I don't want to waste time looking into package incompatibilities and reinstalling libraries, it's almost certain I wouldn't notice any difference with an improved package.

With other applications I have a sense developed from experience on how often to upgrade, how much to wait between the release of an upgrade and installing it and so on. But I'm in the dark with regards to R.

And to be clear: I'm not talking about R itself, but its libraries.

Thanks.

like image 843
wishihadabettername Avatar asked Aug 12 '10 00:08

wishihadabettername


People also ask

Should you update R packages?

If you're updating R itself, you should update your packages. Depending on your installation, R will make a new directory for packages anyway, so you either have to relink your old set or reinstall them. If you're going to relink, update and rebuild, or you'll likely get a lot of annoying warnings later to do so.

When should I update R?

While there is no requirement to regularly update your installation of R and RStudio, occasionally updating your software ensures that you have all of latest functionality and resources. The R Project Team and the Foundation for Open Access Statistics [developers of RStudio] regularly update these applications.

What is the best way to update R?

If you want to update R and RStudio: One way is to run the actual R program. There, you can go to the “R” menu and click “Check for R Updates” (see image below). If you do that, R will tell you the current version you're on, and whether or not there is a more updated version that you can download (circled in blue).

Do you have to install R packages every time?

You only need to install packages the first time you use R (or after updating to a new version). **R Tip:** You can just type this into the command line of R to install each package. Once a package is installed, you don't have to install it again while using the version of R!


1 Answers

Here is my philosophy: the naïve user never updates. The sophisticated user always updates. The power user updates often, but carefully.

Mindless updating is not always beneficial. Bugs work their way in updated versions of R libraries (or R itself!), and you could break your existing code by updating without reading the change log or commit history. For example, R 2.11 broke lme4 on OS X... it pays to carefully update and run demos of packages between releases. It really sucks to update to a new library or R release and realize something broke when you have a deadline.

like image 129
Vince Avatar answered Nov 16 '22 02:11

Vince