gpt4 book ai didi

r - ESS 调用不同的 R 安装

转载 作者:行者123 更新时间:2023-12-04 02:00:37 25 4
gpt4 key购买 nike

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

感谢您的所有时间和帮助

最佳答案

ESS 可以启动其他版本的 R,前提是它知道它们在您的系统上的位置。下面粘贴的是来自 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.

关于r - ESS 调用不同的 R 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5906909/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com