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

Simon Urbanek simon.urbanek at r-project.org
Thu Jul 19 22:24:57 CEST 2012


On Jul 19, 2012, at 12:13 PM, 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"?
> 

It depends on the platform and what you want to relocate (R or just the packages) and on the package itself. For example on OS X absolute paths are included in dylibs, so you can move packages that allow it and don't link to other packages but you can't relocate R or packages that link to other packages directly or libraries within the package (that should be rare, though). Whether a package allows relocation depends whether it hard-codes any paths it uses - typical packages use facilities like system.file to locate files so those are relocatable, but if a package determines paths at configure time it may not be relocatable.

Since you didn't even specify the platform you're interested in, this is only a generic answer ...


> 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
> 

You can install BioC packages simply with install.packages() - there is no black magic involved, it's a regular repository just like CRAN ...

Cheers,
Simon


> 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
> -- 
> Paul E. Johnson
> Professor, Political Science    Assoc. Director
> 1541 Lilac Lane, Room 504     Center for Research Methods
> University of Kansas               University of Kansas
> http://pj.freefaculty.org            http://quant.ku.edu
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 



More information about the R-devel mailing list