[R] Updating Packages with Personal Library

From: Alan Lue <alan.lue_at_gmail.com>
Date: Fri, 07 Nov 2008 02:40:35 -0800


I'm having trouble running `updates.packages()' and installing into a personal library.

Setup:

1. .Renviron file contains: R_LIBS_USER="~/lib/R/%p-library/%v"
2. Hence "personal library" is: ~/lib/R/i486-pc-linux-gnu-library/2.6/
3. Library path upon starting R:

> .libPaths()

[1] "/home/johnny/lib/R/i486-pc-linux-gnu-library/2.6"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"

That's the setup. The problem is that `update.packages()' does not consider packages in my personal library when determining what to update. To elaborate:

Here's some output when I update packages:

> update.packages(instlib=.libPaths()[1])
KernSmooth :
 Version 2.22-21 installed in /usr/lib/R/library  Version 2.22-22 available at
http://cran.cnr.Berkeley.edu Update (y/N/c)?
...

I answer "yes" to everything, and the update succeeds; updated packages are installed into my personal library,
`~/lib/R/i486-pc-linux-gnu-library/2.6/'. But if I run the package update command again, immediately after having just run it, I get the exact same output:

> update.packages(instlib=.libPaths()[1])
KernSmooth :
 Version 2.22-21 installed in /usr/lib/R/library  Version 2.22-22 available at http://cran.cnr.Berkeley.edu Update (y/N/c)?

R looked in `/usr/lib/R/library', saw that there was a package that needed updating, and neglected the fact that the updated package was already in my personal library.

How can I get R to check packages in my personal library while determining what to update?

Alan

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 07 Nov 2008 - 10:43:29 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 Fri 07 Nov 2008 - 11:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive