[BioC] writing of /usr/lib/R

Henrik Bengtsson hb at maths.lth.se
Wed Nov 9 04:41:42 CET 2005


Liaw, Andy wrote:

>/usr/lib/R/library is the default place where packages are installed, but by
>no means the only place where they can be installed.  Where R searches for
>packages when asked is defined by the environment variable R_LIBS, which can
>be defined in several possible places.  See the `Details' section of
>?Startup (type that at the R prompt).
>  
>
Using R_LIBS, the user simply uses install.packages() in  R to install 
a  package and R and R_LIBS takes care of the rest.

We added the following to each users shell-startup script to manage many 
users on a heterogeneous system:

if test "${R_LIBS}" = ""; then
  # Get the OS type in lower case
  ostype=`uname -s | tr '[A-Z]' '[a-z]'`
  export R_LIBS=${HOME}/R/R_LIBS/${ostype}/library/
  if ! test -d "${R_LIBS}"; then
    mkdir -p ${R_LIBS}
  fi
fi

This was needed because some packages build native code and therefore 
had to be installed in seperate locations depending on platform.  Plain 
R packages would take up unecessary space this way, but we could live 
with that. 

Note that R_LIBS may hold more than one directory, so you could include 
a R_LIBS=${HOME}/R/R_LIBS/cross-platform/library/ directory, but then 
the user has to specify this directory explicitly when calling 
install.packages().

/Henrik

>BTW, R-help is probably the more appropriate place for a non-BioC specific
>question like this.  You're likely to get more useful help there.
>
>Cheers,
>Andy
>
>
>
>  
>
>>From: Michael Green
>>
>>New to the list, first post!
>>
>>I'm doing sysadmin work for our Bioinformatics department where I
>>manage a couple of IBM BladeCenter based clusters. Systems are running
>>SLES9 SP1 i586 (dual Xeon 32bit).
>>Before I'm going to ask my question I must admit that I'm complete
>>novice to R, and since I won't use it myself I didn't read much of the
>>documentation supplied with the package. My question is more related
>>to system administration + R, rather then to R itself.
>>
>>So here it is:
>>Some time ago I received a request from our users to install R on one
>>of the clusters.
>>I went ahead and installed R-base-2.1.0-1 supplied by the 
>>vendor (SuSE/Novell).
>>After that following the request of the users, I installed the
>>Bioconductor packages using the standard procedure described at
>><http://www.bioconductor.org/download>:
>>source("http://www.bioconductor.org/biocLite.R")
>>biocLite()
>>
>>Soon thereafter it became apparent that during their work with R, our
>>users need to install/uninstall or otherwise change the hierarchy
>>under /usr/lib/R  which is of course not writable by any user other
>>than root. As you surely know that's the case for almost every
>>directory under /usr. From talking to one of my users I've learned
>>that R routinely downloads/installs/updates itself and the changes go
>>into /usr/lib/R exclusively (or almost exclusively?).
>>Now I'm faced with dilemma of how to allow users to write to
>>/usr/lib/R, which is not a big deal on itself as there are at least a
>>couple of ways doing that:
>>1. Play with standard unix permissions: create a new group for R
>>users; chgrp <that_group> /usr/lib/R. etc...
>>2. Create ACL for /usr/lib/R
>>
>>But my question is not about how to make /usrlib/R writable, but this:
>>since /usr and everything under it is not traditionally writable by
>>regular users what's the official stance of R developers on this? Is
>>it assumed that all R users should have root access to the system
>>where R installed to be able to change contents of /usr/lib/R and
>>actually do any useful work?
>>
>>About our R installation:
>>bioinfo4:/usr/lib/R # R
>>
>>R : Copyright 2005, The R Foundation for Statistical Computing
>>Version 2.1.0  (2005-04-18), ISBN 3-900051-07-0
>>
>>    
>>
>>>sessionInfo()
>>>      
>>>
>>R version 2.1.0, 2005-04-18, i686-pc-linux-gnu
>>
>>attached base packages:
>>[1] "methods"   "stats"     "graphics"  "grDevices" "utils"   
>>  "datasets"
>>[7] "base"
>>
>>--
>>Warm regards,
>>Michael Green
>>
>>_______________________________________________
>>Bioconductor mailing list
>>Bioconductor at stat.math.ethz.ch
>>https://stat.ethz.ch/mailman/listinfo/bioconductor
>>
>>
>>    
>>
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/bioconductor
>
>
>  
>



More information about the Bioconductor mailing list