[R-sig-Debian] installing/updating R packages: apt-get vs. install.packages() and .libPaths()

Michael Friendly friendly at yorku.ca
Fri Mar 10 17:14:11 CET 2006


I recently had to rebuild my entire debian system to correct some severe 
dependency
conflicts and security issues.  I installed a new harddisk, linux kernel 
and started from
scratch, keeping my old disk mounted as /olddisk.  In the process I 
switched from unstable
to stable distros as recommended by a local sysadmin to avoid such 
problems in the future.

Now I want to be able to install and update R and R packages with ease 
and with minimal
confusion about different versions in different libraries, so that I can 
(a) install new
packages in a consistent way with my current R version, (b)  install a new
R version with apt-get install r-base, ...  (c) run update.packages() or 
something equivalent
to update all the packages coherently. 

 I'm confused about where things go based on apt-get install 
{r-base,r-cran}* vs install.packages()
and whether I am running as root vs me.  If I want to update.packages() 
I don't want to have
to worry about whether I am currently root or me -- I just want to be 
*me* and have it work.

 > .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"
[3] "/usr/lib/R/library"
 >

"/usr/lib/R/library"   for apt-get install r-base, as root
"/usr/lib/R/site-library"    for apt-get install r-cran, as root
"/usr/local/lib/R/site-library"   for install.packages() as {me,root}

My machine is single user; should I just give myself chmod g+w privs 
under  /usr/lib/R/site-library
and maybe /usr/lib/R/library?  What is the recommended discipline?

thx,

-- 
Michael Friendly     Email: friendly at yorku.ca 
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA



More information about the R-SIG-Debian mailing list