Re: [R] smoothest way to upgrade R, say from 2.6.1 to 2.6.2?

From: Galkowski, Jan <>
Date: Thu, 13 Mar 2008 14:40:36 -0400

Thanks to Stefan Grosse, Gabor Grothendieck, and Professor Ripley for all this guidance. I have collected the details, concatenating them below, for future reference. Sorry if attributions got muddled.

It is WinXP Pro in the primary, and there's no need to keep around older versions. But there are (Debian) Linux users here interested in both the same question, and any caches of R-related shell goodies that might be out there, comparable to "batchfiles", both for upgrades and other things, like maybe spawning multiple R processes and the like, or running headless Rs on several servers at once.

I apologize for leaving that out, but I thought putting out a wild guess on this might draw comment and help. It did.

Thanks much, again.

-----Original Message-----
From: Prof Brian Ripley [] Sent: Thursday, March 13, 2008 2:12 PM
To: Stefan Grosse
Cc:; Galkowski, Jan Subject: Re: [R] smoothest way to upgrade R, say from 2.6.1 to 2.6.2?

If this _is_ Windows, the question is discussed in detail in the rw-FAQ. That document also discusses how to install packages into a site or personal library which can make upgrading easier.

Another consideration not told to us was whether one wants to keep around a working copy of the older version. My dept does so (so students can use a consistent version when preparing their theses, for example), and that affects the choice of strategy.

On Thu, 13 Mar 2008, Stefan Grosse wrote:

> On Thursday 13 March 2008 06:05:15 pm Galkowski, Jan wrote:
> GJ> (1) How do people manage an upgrade, from 2.6.1, say, to 2.6.2?
> GJ> 2.6.2 will create its own subdirectory, obliging a copy of library

> GJ> contents to the new spot. The documents are easier.
> You forgot to enlighten us about your system. From what you are
> telling I would guess its Windows (XP?). On my windows machine I
> install R in the very same directory of the old R. So you could create

> programs/R and there install your R but of course you must then
> alternate the suggested directory during the installation.
> GJ>
> GJ> (2) The problem with simply copying library contents is a fear of
> GJ> upward incompatibilities. Am I worrying for naught here? Are
> GJ> packages upward compatible but possibly not downwardly so?
> There is no problem within minor releases like 2.6.1 -> 2.6.2 but on
> greater "jumps" update.packages offers the option checkbuilt which if
> set TRUE updates the packages to their next built. So if 2.7.0 is
> released and you install that are over your old you should enable this
> GJ> (3) What about changing shortcuts, places for .Rprofile and the
> GJ> Do people have scripts that do all these things at once?
> See above
> GJ>
> GJ> It would be nice to have a single control file where R binaries
> GJ> and libraries and the like could be specified. That way, all that

> GJ> would need to be done is edit one file with an uptick on a point
> GJ> release number, say, and things would be fine.


> GJ> Where does this "update.packages" with the "checkbuilt" live?
> just type update.packages()
> in case of a major version change update.packages(checkbuilt=T)
> GJ> Is all this described on the Wiki some place? Or in the docs?
> In the docs
> run
> ?update.packages
> or have a look at the admin guide


> I think Stefan has answered this so I will just
> add this about batchfiles. In the batchfiles distrirbution:
> is a file Rgui.bat. If you put that anywhere in your path and make
> your shortcut to that instead of to R itself then it will find the
> recent version of R from the registry and start that so you don't have
> to update shortcuts each time you change R versions. There are
> also Rcmd.bat, sweave.bat and similar versions for the corresponding
> tasks. Using those you never have to set your path to R when
> installing or upgrading R on Windows.
> The most recent version of batchfiles is for Vista and the next to
> most recent is for XP as per home page.
> If you do want to move or copy your packages from one library to
> another movedir.bat and copydir.bat will do that. You can then use
> checkbuilt if its a major version change. There are also some other
> methods described in the Links on the home page.
> mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 13 Mar 2008 - 18:43:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 13 Mar 2008 - 19:30:34 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive