From simon.urbanek at r-project.org  Thu Jul 19 22:24:57 2012
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Thu, 19 Jul 2012 16:24:57 -0400
Subject: [Rd] Are R packages supposed to be "relocatable"? (avoiding
	BioConductor scripts...)
In-Reply-To: <CAErODj_84GbOi4hL5sx43aDkh6YAqrAndDETf2uT2zH=mgy=LQ@mail.gmail.com>
References: <CAErODj_84GbOi4hL5sx43aDkh6YAqrAndDETf2uT2zH=mgy=LQ@mail.gmail.com>
Message-ID: <EAA4E11E-A889-4DE3-969F-678D6585EFF8@r-project.org>


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



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