Thursday, January 16, 2014

ESS R integration with Win32 Emacs

I've had R installed for quite some time and I thought I'd give ESS a spin with it.  Turns out, I just had to do this to get it working on Win 7.

(setq load-path (cons "c:/gnu/elisp/R/ESS/lisp" load-path))
(require 'ess-site)
(setq-default inferior-R-program-name "C:\\R\\R-2.15.1\\bin\\x64\\Rterm.exe")

And I could invoke R from Emacs and send code to the inferior process to execute.   However, I do get the following messages which I'm not sure why it turns up.

Finding all versions of R on your system...
Sorry, no version of R could be found on your system.

Anyone know why it happens?

3 comments:

Anonymous said...

I believe this has to do with the way you specify inferior-R-program-name. Have you tried this syntax : (setq grep-program "\"C:/Program Files/Git/bin/grep.exe\"")

I have R in the program file directory and ESS find it automatically. I don't specify the path to rterm in my configuration files.
Hope this helps

Glider said...

my ESS setup for R is like this:
(setq inferior-R-program-name "c:/Users/_file_your_path/R-3.0.2/bin/R.exe")

it works for me on windows xp. ESS is from ELPA latest version

Glider said...

a correction: MELPA, not ELPA version (ESS)