The Environment variables settings in bin/R, why do they ignore environment variables of the same name?
On 26 February 2015 at 16:20, Saptarshi Guha wrote:
| In installation/R/bin/R i notice | | 1. R_HOME_DIR is hard coded e.g. | R_HOME_DIR=/usr/local/lib64/R | | 2. It ignores R_HOME_DIR | | echo "WARNING: ignoring environment value of R_HOME" | | 3. R_SHARE_DIR, R_INCLUDE_DIR and R_DOC_DIR are also hard coded. | | Is there a reason why these settings do not read the values from the | environment variables of the same name (assuming they exist) and | defaulting to these hard coded values in case they dont? AFAICR you supposed to deal with this via $PATH and just pick one: Ie with edd at max:~$ grep ^R_HOME_DIR /usr/lib/R/bin/R /usr/local/lib/R-devel/bin/R /usr/lib/R/bin/R:R_HOME_DIR=/usr/lib/R /usr/local/lib/R-devel/bin/R:R_HOME_DIR=/usr/local/lib/R-devel/lib/R edd at max:~$ I get, respectively, edd at max:~$ R --version | head -1 R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" edd at max:~$ PATH="/usr/local/lib/R-devel/bin/:$PATH" R --version | head -1 R Under development (unstable) (2015-02-22 r67876) -- "Unsuffered Consequences" edd at max:~$ and I have R-devel aliased to RD and R-devel in /usr/local/bin. Dirk
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org