datasnakes / renv

Creating virtual environments for R.
MIT License
17 stars 0 forks source link

Use proper R_HOME value. #52

Open grabear opened 5 years ago

grabear commented 5 years ago

Problem

The Installation/Admin guide section 2.1 describes R_HOME as follows:

Choose a directory to install the R tree (R is not just a binary, but has additional data sets, help files, font metrics etc). Let us call this place R_HOME. Untar the source code.

This has was misleading to me, so I thought R_HOME was the directory that R was installed in this entire time, but I was confused by the wording. So RHOME is not the same as the --prefix_ in section 2.4):

where prefix is determined during configuration (typically /usr/local) and can be set by running configure with the option --prefix, as in

./configure --prefix=/where/you/want/R/to/go

AND:

prefix/LIBnn/R or libdir/R .........all the rest (libraries, on-line help system, …). Here LIBnn is usually ‘lib’, but may be ‘lib64’ on .........some 64-bit Linux systems. This is known as the R home directory.

This clears up some confusion I've had with the manual, and the errors we used to get when including our false R_HOME in the .Renviron file.

Solution

LIBnn (above) is either 'lib' or 'lib64'. So on 64 bit OS, R_HOME != "prefix", but R_HOME does equal "prefix/lib64/R".

To fix this we need to change a few things:

grabear commented 5 years ago

R_HOME still does weird stuff, when set. I don't really know what to say about it....