[R] how to get old packages to work on R 2.12.1

Marc Schwartz marc_schwartz at me.com
Wed Jan 19 17:40:38 CET 2011


On Jan 19, 2011, at 9:49 AM, Joseph Boyer wrote:

> I just installed R 2.12.1, and when I went to run a few old programs with it, nothing worked.
> I got a ton of error messages saying such and such package was built before R 2.10.0 and needed to be reinstalled.
> 
> These were not just warning messages, but error messages that prevent the programs from running when
> they were running just fine with R 2.10.1
> 
> For some of those packages, such as deSolve, I can't find any recent versions to download to correct the problem.
> 
> So my first question is, is there a way around this error that doesn't require actually installing recent versions of all those old packages?
> I suppose I could just use R 2.10.1, but suppose at some point I want to use both an old package and a new package that was built
> under R 2.12.1 in the same program? That has happened by the way. I wanted to use deSolve and yags. Since I don't have an old version of yags,
> I had to install the current version on CRAN, and it won't work under 2.10.1.
> 
> My second question is, if not, should the R developers reconsider their strategic decision to invalidate packages just because they were built
> under early versions of R?
> 
> I would be willing to bet that for many users, the improvements from R 2.10.1 to R 2.12.1 are minor compared with the hassle caused by the fact
> that their old programs will no longer work.
> 
> This especially complicates application development, where the R programmer is not the end user.
> What developer is going to use R for his applications if he can't even be sure they will work under future versions?


The burden of determining when and how you update R and any contributed packages is on you, not the R Core developers. R's SDLC is well known and is also documented in:

  http://www.r-project.org/doc/R-FDA.pdf

Specifically as it pertains to contributed packages, the total burden is on the package authors/maintainers to keep their packages up to date with  R as new versions are released. If a new version of R "breaks" an old package as a result of core functionality changes, then the contributed package authors and maintainers have been remiss in not keeping up to date with R's development process, since such changes are announced well in advance and beta releases of R are made available for testing prior to release. 

There is no absolute guarantee that a contributed package will work for all future versions of R. A package maintainer may elect to stop maintaining the package at any time, by choice or otherwise. We are all volunteers and mortal...

Frankly, that is no different than if you were using a commercial package with third party contributed functionality.

You don't indicate what OS you are running on, but according to CRAN, deSolve is available in both source and binary package form:

  http://cran.us.r-project.org/web/packages/deSolve/index.html

for current versions of R. 

With respect to yags, AFAICS, it is not on CRAN, but on R-Forge:

  https://r-forge.r-project.org/R/?group_id=329

which means that you may need to contact the package maintainer regarding whether or not his package is being actively maintained and available for your unstated OS and perhaps why it is not on CRAN, which would improve availability. The tests on R-Forge would seem to suggest that it is working with 2.12.1.

The general solution may be as simple as running update.packages(...) depending upon your OS. If on Windows, see:

  http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f

That being said, in general, it is best to cleanly install both a new version of R and the associated contributed packages that you require.

HTH,

Marc Schwartz



More information about the R-help mailing list