On Fri, May 31, 2013 at 10:15 AM, Wolfgang Ramos <
ramos@psychologie.uni-kiel.de> wrote:

> Hi,
>
>
> (require 'ess-site)
>
> What can I do to make ESS find my Rterm.exe? I could really need some
> help...
>
>
This is a very reasonable question.  It is a long standing problem and I am
pretty sure there have been recent changes to help with it.

The ESS Manual still says do this (
http://ess.r-project.org/Manual/readme.html) before ess-site

(setq inferior-R-program-name "c:/progra~1/R/R-2.15.1/bin/Rterm.exe")

But I'm pretty sure that's not up to date. The release notes for ESS 13.05
have this somewhat unsettling message

ESS[R]: On Windows, there is now a new customizable variable
     (currently called `ess-directory-containing-R') to tell ESS where
     to look for the `Rterm.exe' executables.  The name of the variable
     and the values it can take are both in beta and subject to change.
     Prior to this variable, ESS searched only in the default
     installation directory.  Setting this variable now tells ESS how
     to find `Rterm.exe' executables when they are installed somewhere
     else.

So in your case, I think that means put this before ess-site

(setq ess-directory-containing-R "X:/alphaAndOmega/R/R/bin/i386")

But I don't know for sure if you need the i386 on the end. I am ABSOLUTELY
sure you need the forward slashes. And I'm pretty sure that on Windows
after Vista, it is not necessary to truncate the directory names with the
~1 notation.  But I've been wrong before, many times.

Because I've hit that problem many times, I usually take the brutish
approach of adding Rterm's folder to the system path.  Control Panel ->
System -> advanced -> environment variables. semicolon is the separator.  I
usually add the bin and the bin\arch directories to the end of the path.
Don't forget to log out and log in before you see the result. Open a DOS
Command box and type "set" and it will show your environment, including the
path.

I do that mainly because 1) I understand it and 2) it always fixes this
problem and 3) it may help other programs, not just Emacs/ESS find R when
they need it. It is not optimal because it adds some system overhead by
appending to the PATH variable in the environment. And it requires
administrative access, unless you learn how to edit your own user
environment in windows (deals with the UAC framework in modern Windows.)

But I remain cautiously optimistic that ess-directory-containing-R will be
a magic bullet for you.

Why not try it and let us know if it works?

pj
-- 
Paul E. Johnson
Professor, Political Science      Assoc. Director
1541 Lilac Lane, Room 504      Center for Research Methods
University of Kansas                 University of Kansas
http://pj.freefaculty.org               http://quant.ku.edu

	[[alternative HTML version deleted]]

