[ESS] several R versions

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Wed Aug 31 21:00:05 CEST 2005


hi Kasper,
Kasper Daniel Hansen writes:
 > Hi
 > 
 > I am currently using R with ESS v5.2.9 under Mac OS X using Carbon  
 > Emacs (Emacs v. 22.0.50.1).
 > 
 > I have started to use two different R versions. The standard stable  
 > release is called using R in the shell. Then I have the development  
 > version which I start using R-devel (this is a symlink in /usr/local/ 
 > bin).
 > 
 > I would like to use both versions in Emacs, eg. doing something like  
 > (all this exact form is not really relevant)
 >    M-x R
 > and
 >    M-x R-devel
 > 
 > I assume that it is quite easy to do so, but how?
 > 

not trivial, but close; here is an excerpt from the documentation:

   R on Unix systems: If you have "R-1.8.1" on your `exec-path', it can
be started using `M-x R-1.8.1'.  By default, ESS will find versions of
R beginning "R-1" or "R-2".  If your versions of R are called other
names, consider renaming them with a symbolic link or change the
variable `ess-r-versions'.  To see which defuns have been created for
starting different versions of R, type `M-x R-' and then hit [Tab].
You will then see if any defuns for particular versions of R have been
created.  These other versions of R can also be started from the
"ESS->Start Process->Other" menu.

so, in the first instance, if you make a symlink in your exec-path
(i.e. your regular PATH) of say 
R-2.2 to point to whatever R-devel

then when you restart Emacs, hopefully M-x R-2.2 will work.

If your binary is called R-devel You might get some joy changing
ess-r-versions to something like '("R-2" "R-devel")

let us know how it goes!

stephen




More information about the ESS-help mailing list