I installed R in a directory called "X:\alphaAndOmega\R\R". So Rterm.exe (32-Bit version) is located in "X:\alphaAndOmega\R\R\bin\i386". I know that it's not a 'standard R-directory' and that "standard R-directories", like R-3.0.0 are easily recognized by ESS (at least if I add them to my PATH variable in Windows).
I tried customizing my .emacs file in a way, that ESS would look for Rterm.exe in my non-standard directory, but I wasn't able to do so. I'm absolutely new to emacs and i tried playing around wird some of the following commands:
inferior-R-program-name
and ess-rterm-version-paths
But I failed. ESS doesn't find anything.
I use emacs 24.3.1, ESS 13.05 and R 2.15. At the moment my .emacs file contains just one line, so that shouldn't be a problem:
(require 'ess-site)
What can I do to make ESS find my Rterm.exe?
To point ESS to a non-standard R-directory, set the variable
ess-directory-containing-R
. (This handy variable is a relatively recent feature.) Quoting from the ESS manual:If I recall correctly, this needs to be done before loading
ess-site.el
; in any case that's what I have in my .emacs file, which does a fine job of finding all of my R versions, which are all stored under"C:/R/"
:There really only is one configuration setting in
ess-site.el
; I have used that one in the past. Here it is fromess-site.el
but note that it is commented-out:And I just checked on my work machine, and there
Rterm.exe
is found by default from the$PATH
. I do use the Emacs/ESS/AucTeX bundle by Vincent Goulet which I can wholeheartedly recommend as "it just works."With a default install of ESS (currently 17.11) and R (3.4.4) on Windows, running M-x
R
tries to execute Rterm.exe in yourexec-path
and will fail if it is not found there. The automatically generated runners should be used instead eg. M-xR-3.4.4-64bit
or simply M-xR-newest
.To use a non-standard R location set
ess-directory-containing-R
to the base directory to search for R installations. This needs to be done beforeess-site
is loaded so might require restarting emacs after updating your init file. This will allow the automatically generated runners to be created.Setting the ess-directory-containing-R variable did not work when I had this problem. Further, when I did a 'describe-variable' on it, on another machine which had a properly working ess-emacs on it, the value was nil, so I don't think that's right.
What DID work is setting the PATH variable in the Windows environment to point to the directory that Rterm.exe lives in, and then restarting emacs.