updating r-cran- packages on a new Ubuntu lucid system
I'm not any further ahead in trying to update vcd from 1.2-7 to 1.2-9. How can I resolve this? - Tried removing r-cran-colorspace, but aborted that because apt was going to remove other packages that depend on colorspace. It also tells me that r-cran-effects is BROKEN labtest: /usr/lib # aptitude remove r-cran-colorspace Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done The following packages are BROKEN: r-cran-effects The following packages will be REMOVED: r-cran-colorspace 0 packages upgraded, 0 newly installed, 1 to remove and 3 not upgraded. Need to get 0B of archives. After unpacking 885kB will be freed. The following packages have unmet dependencies: r-cran-effects: Depends: r-cran-colorspace but it is not installable The following actions will resolve these dependencies: Remove the following packages: r-cran-effects r-cran-rcmdr Score is 188 Accept this solution? [Y/n/q/?] q Abandoning all efforts to resolve these dependencies. Abort. - Tried again to update.packages(). Works for car, but not vcd because colorspace was built for R 2.9.2 labtest: /usr/lib # R R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit) ... > update.packages(ask=TRUE) car : Version 2.0-8 installed in /usr/lib/R/site-library Version 2.0-9 available at http://probability.ca/cran Update (y/N/c)? y rgl : Version 0.89 installed in /usr/lib/R/site-library Version 0.92.798 available at http://probability.ca/cran Update (y/N/c)? n vcd : Version 1.2-7 installed in /usr/lib/R/site-library Version 1.2-9 available at http://probability.ca/cran Update (y/N/c)? y trying URL 'http://probability.ca/cran/src/contrib/car_2.0-9.tar.gz' Content type 'application/x-gzip' length 358907 bytes (350 Kb) opened URL ================================================== downloaded 350 Kb trying URL 'http://probability.ca/cran/src/contrib/vcd_1.2-9.tar.gz' Content type 'application/x-gzip' length 1104510 bytes (1.1 Mb) opened URL ================================================== downloaded 1.1 Mb * installing *source* package ???car??? ... ** R ** data ** moving datasets to lazyload DB ** inst ** preparing package for lazy loading Loading required package: splines ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (car) * installing *source* package ???vcd??? ... ** R ** data ** moving datasets to lazyload DB ** demo ** inst ** preparing package for lazy loading Error : package 'colorspace' was built before R 2.10.0: please re-install it ERROR: lazy loading failed for package ???vcd??? * removing ???/usr/lib/R/site-library/vcd??? * restoring previous ???/usr/lib/R/site-library/vcd??? The downloaded packages are in ???/tmp/RtmpUr2MTR/downloaded_packages??? Warning message: In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, : installation of package 'vcd' had non-zero exit status
On 1/30/2011 9:40 PM, Dirk Eddelbuettel wrote:
For what it's worth, I use the scriipt below (via ~/bin/update.r) which is
also an example script in the littler package.
It _explicitly_ restricts the update to
/usr/local/lib/R/site-library
so that the update from R is kept separate from the update via the Debian or
Ubuntu package manager.
Hope this helps, Dirk
#!/usr/bin/r -t
#
# a simple example to update packages in /usr/local/lib/R/site-library
# parameters are easily adjustable
## adjust as necessary, see help('download.packages')
repos<- "http://cran.r-project.org"
## or use BioC's repo list if Biobase is installed:
suppressMessages(rc<- require(Biobase))
if (rc) {
repos<- Biobase:::biocReposList()
}
## this makes sense on Debian where no package touch /usr/local
lib.loc<- "/usr/local/lib/R/site-library"
## simply unrolling of all unlink over all files 'repos*' in $TMP
clearCache<- function() {
sapply(list.files(path=tempdir(), pattern="libloc*", full.names=TRUE), unlink)
}
## Always clear caches of remote and local packages
clearCache()
## r use requires non-interactive use
update.packages(repos=repos, ask=FALSE, lib.loc=lib.loc)
## Always clear caches of remote and local packages
clearCache()
Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street Web: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA