[ESS] Finding Rterm in R 2.12.0 on Windows

Kevin Coombes kevin.r.coombes at gmail.com
Tue Dec 28 22:39:43 CET 2010



Richard M. Heiberger wrote:
> 
> Ruth,
> 
> The correct line in your .emacs on a 64-bit machine to make M-x R work is
> 
> ;; for 32-bit R
> (setq-default inferior-R-program-name "C:\\Program
> Files\\R\\R-2.12.1\\bin\\i386\\Rterm.exe")
> 
> ;; for 64-bit R
> (setq-default inferior-R-program-name "C:\\Program
> Files\\R\\R-2.12.1\\bin\\x64\\Rterm.exe")
> 
> On a 32-bit machine, the correct line is
> (setq-default inferior-R-program-name "C:\\Program
> Files\\R\\R-2.12.1\\bin\\i386\\Rterm.exe")
> 
> There is no need to change anything inside ESS itself.
> 
> I anticipate having this and related changes in an ESS distribution early
> in
> January.
> 
> Rich
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
> 
> 

Actually, I believe there *is* something that should be changed in ESS
itself.  

The lisp function "ess-find-rterm" is supposed to be able to locate all of
the installed executable versions of Rterm on the system. The optional
argument to this function specifies the root directory where versions of R
are installed; in the example of the original question, this would default
to something like
  "C:\\Program Files\\R\\"
The lisp function starts by locating all installations of R within this
directory, which might (as a reasonable example today) include both
  "R-2.11.1\\"
and
  "R-2.12.1\\"
The lisp function is then hard-coded to append "bin/Rterm.exe" to each of
these paths and see if that executable file exists.  This function works
with R versions up through 2.11. 

However, it *fails* with the new system that the R developers switched to
with 2.12, since they interpose the extra path step of either "i386" or
"x64" before the "bin" path component.

My lisp knowledge is good enough to locate the source of the problem, but I
haven't written any in a sufficiently long time that I'm not sure how to
edit the function to make it (optionally) include one of these extra path
components.  Hopefully, someone with more lisp-writing skills can update the
function so that we do not all have to edit the "inferior-R-program-name" in
a .emacs file or an ess-site.el file every time we update to a newer version
of R.

Kevin
-- 
View this message in context: http://old.nabble.com/Finding-Rterm-in-R-2.12.0-on-Windows-tp30425290p30547563.html
Sent from the ESS - Help mailing list archive at Nabble.com.



More information about the ESS-help mailing list