Hi, I have searched the archive for the solution of this question, but couldn't find anything, so I thought I would ask here. I am using R on a Debian (testing) system. Many of the R packages I use are installed as .deb packages, those which are not available in this format I install using install.packages. When calling update.packages, sometimes the R repository version is more recent than the Debian package, and update.packages offers to update it which I don't want because the new debianized version will be out soon. Is it possible to have update.packages recognize that these are "systemwide" packages and ignore them when updating? Or is manual selection of what to update the only option? Thanks, Tamas
Tamas, Great question. On 4 November 2006 at 11:55, Tamas K Papp wrote: | I have searched the archive for the solution of this question, but | couldn't find anything, so I thought I would ask here. It has been discussed not that long ago on r-sig-debian, feel free to subscribe there as you may find the list useful for all matters Debian and R. | I am using R on a Debian (testing) system. Many of the R packages I | use are installed as .deb packages, those which are not available in | this format I install using install.packages. | | When calling update.packages, sometimes the R repository version is | more recent than the Debian package, and update.packages offers to | update it which I don't want because the new debianized version will | be out soon. Is it possible to have update.packages recognize that | these are "systemwide" packages and ignore them when updating? Or is | manual selection of what to update the only option? Let's recall that we have three locations for R packages under Debian (and hence also Ubuntu et al): i) /usr/lib/R/library used *exclusively* by r-base-core (and e.g. not even by r-recommended such as r-cran-vr, r-cran-boot, ...) ii) /usr/lib/R/site-library used *exclusively* by Debian (or Ubuntu) supplied packages that you can updated with apt-get et al (provided the maintainer stays current) iii) /usr/local/lib/R/site-library used for the rest The key is that these are non-overlapping which you can employ with update.packages() provided you tell update.packages() to limit itself to the directory in iii). Which is as simple as saying > update.packages(lib.loc="/usr/local/lib/R/site-library") Now, for added bonus, the script 'update.r' in the littler package (version 0.0.8 or later) does all that for you. So after an initial $ sudo apt-get install littler all you need is $ sudo /usr/share/doc/littler/examples/update.r Cheers, Dirk -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison
Tamas K Papp
2006-Nov-05 02:35 UTC
[R-sig-Debian] [R] can update.packages Debian package files?
On Sat, Nov 04, 2006 at 08:14:59PM -0600, Dirk Eddelbuettel wrote: Dirk,> It has been discussed not that long ago on r-sig-debian, feel free to > subscribe there as you may find the list useful for all matters Debian and R.I did, so I am replying here. Thanks for letting me know about this list.> Now, for added bonus, the script 'update.r' in the littler package (version > 0.0.8 or later) does all that for you. So after an initiallittler is simply amazing -- the power of R as a scripting language... overwhelming. Thank you for packaging that! Thanks, Tamas