[ESS] Choosing between multiple *remote* R versions

Vitalie Spinu spinuvit at gmail.com
Fri Jun 8 21:43:26 CEST 2012


Hi Tom, 

 It looks that ESS cannot do that. Current ESS process selection is a
bit rigid. I think we can follow slime here
(http://common-lisp.net/project/slime/doc/html/Multiple-Lisps.html)

We can have a variable ess-inferior-commands such that the user can do
something like:

(setq ess-inferior-commands
      ((R-win ("C:/progs/R/R-term.exe" "--q"))
        R-dev ("~/bin/R-dev")
        myR_remote   ("/path/to/remote/R")))

When ESS starts it can define R-win, R-dev and myR_remote interactive
commands (callable with M-x).

This should also work fine for remote access with tramp. 

  >> "Lasko, Thomas A" <tom.lasko at vanderbilt.edu>
  >> on Wed, 6 Jun 2012 08:40:10 -0500 wrote:

  > Hi folks,
  > I am trying to figure out how to set things up so I can choose between multiple
  > versions of R running on a remote server that I access using emacs/ess/tramp. I
  > know how to do this for different local R versions, but the same strategy hasn't
  > worked for different remote versions. I've scoured the web, various manuals, and
  > searched these archives all to no avail. But I have to believe there's a way to
  > do it.

  > I use emacs tramp mode to edit R files on my remote CentOS machine, and to start
  > R 2.15.0 processes on that machine with M-x R, which just works (amazingly
  > easy). For a specific purpose, I now also have Revolution R 2.13 installed on
  > that machine (under a symlink named Revo64), and I can run it fine from an ssh
  > command line, or I can change the path environment variable so that the Revo R
  > version always starts with M-x R. But I need to be able to selectively run each
  > of these versions via tramp, and I'm having trouble figuring out how to set that
  > up.

For time being you can try to write a little function to reset
environment variable interactively.

  > I know that at least for local versions, there's a variable ess-r-versions where
  > I can list the prefix of each R version potentially found in my path, such as
  > R-2, R64, R-devel, (and for me now, Revo), etc, and they will be available to
  > ESS as processes that can be run under M-x R64, etc. I can get this working for
  > local versions of R, but not for remote versions. I'm guessing that ESS does a
  > search for the versions at startup, long before the remote connection is made,
  > so they are not detected as possible choices.

  > Does anybody know how to set things up so that I can choose between multiple R
  > versions on a remote machine when I am using emacs/ESS/tramp mode? Apologies if
  > this is spelled out in documentation or previously answered somewhere - I did
  > try to find it.


Best, 
Vitalie.



More information about the ESS-help mailing list