Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ESS to call different installations of R

Tags:

emacs

r

ess

I am not sure if this has already been answered here on stack-overflow. I had Emacs-ESS installed on my Unix machine and when ever I start up emacs, particular version of R gets loaded. I now have some new R packages that I wanted to test before installing into default R environment. Hence I installed newer version of R in a local directory and have my new packages installed there. Now if I want to call this newer R version that I installed in a local directory, from emacs, how exactly should I be doing it? I want to be able to call either the default R version or the locally installed R-version.

Thanks for all your time and help

like image 930
Sashi Kiran Challa Avatar asked May 06 '11 04:05

Sashi Kiran Challa


1 Answers

ESS can start other versions of R, provided that it knows where on your system they are located. Pasted below is the relevant section from the ESS manual:

If you have other versions of R or S-Plus available on the system, ESS is also able to start those versions. How this exactly works depend on which OS you are using, as described in the following paragraphs. The general principle, regardless of OS, is that ESS searches the paths listed in the variable exec-path for R binaries. If ESS cannot find your R binaries, on Unix you can change the unix environment variable PATH, as this variable is used to set exec-path.

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 functions have been created for starting different versions of R, type M-x R- and then hit [Tab]. These other versions of R can also be started from the "ESS->Start Process->Other" menu.

like image 113
neilfws Avatar answered Oct 01 '22 08:10

neilfws