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

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Thu, 19 Jul 2012 16:24:57 -0400

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 19 Jul 2012 - 20:30:51 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 - 20:40:33 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