开发者

ESS to call different installations of R

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 direct开发者_C百科ory, 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


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.


These methods didn't work for me. I changed the PATH option to point at the version I wanted, then restarted emacs, and that worked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜