[R] RHOME

Martyn Plummer plummer at iarc.fr
Fri Feb 3 16:46:17 CET 2006


Far be it for me to tell people what they can and cannot do. Perhaps I
can rephrase myself in a less inflammatory way.  

R runs from the build directory as a convenience for developers, so you
don't have to reinstall R every time you change something. But for
users, the standard mechanism "make install" has a number of advantages
over moving the build directory to a publicly accessible location: it is
guaranteed to work, you don't have to do any post-hoc editing of files,
it takes up a lot less space, about 4.6 times less on my system

[martyn at seurat r-devel]$ du -sh R
356M    R
[martyn at seurat r-devel]$ du -sh /usr/local/lib64/R
77M     /usr/local/lib64/R

But if you do want to copy the build directory the, as Martin says,
you can edit the file bin/R so that the line that starts
R_HOME_DIR points to the correct location, e.g.
 
R_HOME_DIR="/usr/local/lib/R"

M.

On Fri, 2006-02-03 at 14:48 +0100, Peter Dalgaard wrote:
> Martin Maechler <maechler at stat.math.ethz.ch> writes:
> 
> >     Martyn> R is designed to run from its build directory.  But
> >     Martyn> if your sysadmin installs it with "make install" (as
> >     Martyn> root), then the shell wrapper that is installed in
> >     Martyn> /usr/local/bin/R will have R_HOME pointing to the
> >     Martyn> right location (/usr/local/lib/R).  Literally moving
> >     Martyn> the build directory to another location is the wrong
> >     Martyn> thing to do.
> > 
> > well, but very easily fixable, and that's what Daniel is asking
> > for:
> > 
> > The default value of R_HOME is only set in exactly one place,
> > namely the 'R' shell script; editing that script - once after
> > the move - is really a piece o'cake.
> 
> Hmm, I was about to say the same, but there seems to be unexpected
> references in other places.
> 
> find `R RHOME` | xargs grep `R RHOME`
> /usr/lib64/R/bin/R:R_HOME_DIR=/usr/lib64/R
> /usr/lib64/R/bin/R:R_SHARE_DIR=/usr/lib64/R/share
> /usr/lib64/R/bin/R:R_INCLUDE_DIR=/usr/lib64/R/include
> /usr/lib64/R/bin/R:R_DOC_DIR=/usr/lib64/R/doc
> 
> (this doesn't normally happen - a SUSE RPM specialty, or due to
> configure flag settings?)

I think this is normal. But the RedHat RPM behaves differently.

(because the RPM build process installs into a temporary build root
which is distinct from the final installation directory, requiring more
sed voodoo).

> 
> Once you start building packages, you also have things like
> 
> viggo:~/>find ~/Rlibrary | xargs grep `R RHOME`
> Binary file /home/bs/pd/Rlibrary/rgl/libs/rgl.so matches
> 
> 
> viggo:~/>find ~/Rlibrary | xargs grep Rlibrary
> Binary file /home/bs/pd/Rlibrary/rgl/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/ISwR/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/mvtnorm/Meta/hsearch.rds matches
> Binary file /home/bs/pd/Rlibrary/nlmeODE/Meta/hsearch.rds matches
> B.....
> 
> on my laptop I had a hit on one of the Sweave support files too.
> 
> Most likely these are quite harmless, but all in all I think Martyn
> has the safest advice: Use "make install", as root (don't forget
> "umask 022").
> 

-----------------------------------------------------------------------
This message and its attachments are strictly confidential. ...{{dropped}}




More information about the R-help mailing list