Re: [Rd] Are R packages supposed to be "relocatable"? (avoiding BioConductor scripts...)

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu, 19 Jul 2012 21:41:27 +0100

Short answer:

setRepositories() # chose what you want from BioC install.packages()

works and always has. 'Smoke and mirrors' are not actually needed.

As for relocatability:

I am guessing you are talking about a Linux cluster ... but the details do matter.

The distribution of Windows binaries relies on installed packages being relocatable, so most packages are written to be. There are a very few exceptions: the one most frequently encountered is packages linked to Rcpp, which on Linux put the path to Rcpp in their DSOs. So you can relocate the package, but not the Rcpp installation it is linked to. (Not a problem on other OSes as it statically links elsewhere.)

A question you did not ask is if you can use differently located R: in most cases yes (I regularly run different versions of R with the same library trees).

We've relocated complete CRAN/BioC installations on Linux several times.

On 19/07/2012 17:13, Paul Johnson wrote:
> I've asked a question in the BioConductor list about package
> management. My solution depends on your answer to the following
> question.
>
> Are installed R packages "relocatable"?
>
> I mean relocatable in the same sense that files in a RedHat RPM file
> might be "relocatable" after compiling
> (http://www.rpm.org/max-rpm/ch-rpm-reloc.html). This allows one to
> build a package as the ordinary user and then the root user can take
> the result and put it wherever it fits well in the path (say,
> /usr/local/lib/R/library).
>
> Here is why I asked. I manage packages in our cluster and some users
> have asked me to install some BioConductor packages. BioConductor
> install documents expect me to run a script as root that does a bunch
> of changes, and I'm just unwilling to do that. If I have to do
> something as root, it has to be something more focused like running a
> particular R command (install.packages(), for example). It seems
> insane to me that they expect (http://www.bioconductor.org/install) a
> root user to run
>
> source("http://bioconductor.org/biocLite.R")
> biocLite("limma")
>
> If I could do the installs as me with their script, and then copy the
> install folder into the system, then it would be OK, if the packages
> would work.
>
> Or perhaps post-processing is required to fiddle some paths inside
> package files?
>
> pj
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 19 Jul 2012 - 20:43:39 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Thu 19 Jul 2012 - 23:00:32 GMT.

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

list of date sections of archive