ESS 调用不同的 R 安装 [英] ESS to call different installations of R

查看:25
本文介绍了ESS 调用不同的 R 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这里是否已经在 stack-overflow 上得到了回答.我在我的 Unix 机器上安装了 Emacs-ESS,每当我启动 emacs 时,都会加载特定版本的 R.我现在有一些新的 R 包,我想在安装到默认 R 环境之前对其进行测试.因此,我在本地目录中安装了较新版本的 R,并在那里安装了我的新软件包.现在,如果我想从 emacs 调用我安装在本地目录中的这个较新的 R 版本,我应该怎么做?我希望能够调用默认的 R 版本或本地安装的 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 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

推荐答案

ESS 可以启动其他版本的 R,前提是它知道它们在您的系统上的位置.下面粘贴的是 ESS 手册的相关部分:

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:

如果您有其他版本的 R 或S-Plus 在系统上可用,ESS 是也能够启动那些版本.如何这完全取决于哪个操作系统您正在使用,如中所述以下段落.一般无论操作系统如何,原则是ESS 搜索列在R 二进制文件的变量 exec-path.如果ESS 找不到您的 R 二进制文件,在unix 你可以换unix环境变量PATH,作为这个变量用于设置执行路径.

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.

Unix 系统上的 R:如果你有exec-path 上的R-1.8.1",它可以是开始使用 M-x R-1.8.1.默认情况下,ESS 会找到 R 的版本R-1"或R-2".如果您的 R 版本被称为其他名称,请考虑用符号链接重命名它们或更改变量 ess-r-versions.到查看创建了哪些函数用于启动不同版本的 R,输入 M-x R- 然后点击 [Tab].这些其他版本的 R 也可以从ESS->开始进程->其他"菜单.

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.

这篇关于ESS 调用不同的 R 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆