[R] Problems with Rscript executable.

Dirk Eddelbuettel edd at debian.org
Mon Apr 28 19:21:34 CEST 2008


On 28 April 2008 at 10:42, Gregg Phillips wrote:
| Good Morning,
| I have recently built R version 2.7.0 on a CentOS release 4.6, 64-bit 
| system using the following command:
| ./configure --prefix=/usr/local/r-2.7.0
| Everything built fine and works properly except for Rscript which is 
| looking for files in the original build directory instead of the 
| specified install directory. Did I forget to add a flag or is this a bug?

I think it's a bug, or 'some unnecessary fragility' in the build system.  

A user noticed the same in one of the beta/rc pre-releases I made of R 2.7.0
for the Debian distro. I immediately reported this to Prof Ripley, but I
never received a reply.

A few easy-ish ways to fix it are:

i)   Define the environment variable RHOME and point to /usr/local/r-2.7.0; 
     if the variable exists Rscript will ignore the compile-time setting.

ii)  Similarly, just alter the code and override rhome in line 67:
     	static char rhome[] = R_HOME;

iii) Correct the fragility in the build system by something like
	$ cd src/unix; R_HOME="/usr/local/r-2.7.0" make Rscript
     which should work.

iv)  Just switch to littler :-)  
     [ http://dirk.eddelbuettel.com/code/littler.html ]

Hoep this helps,  Dirk

Three out of two people have difficulties with fractions.

More information about the R-help mailing list