On 26 September 2015 at 10:27, Jack Wasey wrote: | Having just read section 1.2 in Writing R extensions, a fragment of a | configure script is offered in order to determine the correct compiler | options. It starts by setting R_HOME with: | | : ${R_HOME=`R RHOME`} | | | `R` is called, even if, as in my case, `Rdevel` is the command used to | invoke package compilation. This can be overridden by setting R_HOME | in the call to `Rdevel`, but this seems to be undesirable, since the | whole point of a configure script is that it sets up the package given | the constraints of the compiling environment.
[...] | | Am I doing something wrong? R_HOME is set to the result of the command R RHOME if and only it is unset. And it usually is unset. This scheme generally works, I use it in a few packages on CRAN which had it for years -- and it was initially suggested to my by Kurt to make precisely _this_ work: you set a different $PATH, or call a different R engine. And the right thing happens: edd@max:~$ R RHOME # default installation /usr/lib/R edd@max:~$ RD RHOME # alternate R-devel with a short-hand wrapper /usr/local/lib/R-devel/lib/R edd@max:~$ which RD /home/edd/bin/RD edd@max:~$ The (nice) idea of calling R-devel just 'RD' appears due to Winston. It works the same way if I just call R-devel-sh as I had for years: edd@max:~$ R-devel.sh RHOME /usr/local/lib/R-devel/lib/R edd@max:~$ So if you still think it fails for you, compare to e.g. the packages nloptr RProtoBuf RQuantLib RVowpalWabbit all of which use this scheme. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel