简体   繁体   English

尝试使用 ESS 运行 R 代码时出现“找不到 Rterm”错误

[英]"Rterm could not be found" error trying to run R code using ESS

I'm trying to install Emacs Speaks Statistics using use-package.我正在尝试使用 use-package 安装 Emacs Speaks Statistics。 I have included the following code in my initialisation file.我在初始化文件中包含了以下代码。

(use-package ess :ensure t :init (require 'ess-site))

I believe that ESS is installed correctly because when I run the command Mx ess-version it states that I have version 18.10.我相信 ESS 安装正确,因为当我运行命令Mx ess-version它指出我的版本为 18.10。

However when I tried to run some code in an R file I get the following error in a new buffer但是,当我尝试在 R 文件中运行一些代码时,我在新缓冲区中收到以下错误

Error (ess): Rterm could not be found on the system. Try running run-ess-r-newest' instead, which searches your system for R.

When I run the run-ess-r-newest command an R session opens up in a new window and I can execute R commands in a console session but when I go back to my original buffer with the aforementioned R file and try to execute a line of code from the script the same error occurs in a new buffer.当我运行 run-ess-r-newest 命令时,R 会话会在新窗口中打开,我可以在控制台会话中执行 R 命令,但是当我使用上述 R 文件返回原始缓冲区并尝试执行来自脚本的代码行在新缓冲区中发生了相同的错误。

Is there any suggestions as to how I can run individual lines of code from an R script and the results for these command appearing in a new buffer displayed in the same frame as the already opened R script akin to how RStudio works.是否有关于如何从 R 脚本运行单行代码以及这些命令的结果出现在与已打开的 R 脚本相同的帧中显示的新缓冲区中的任何建议,类似于 RStudio 的工作方式。

Any suggestions greatly appreciated!任何建议非常感谢!

我将包含 R 安装的目录的文件路径添加到Path系统环境变量(我使用的是 Windows 10),现在我可以执行 R 代码而不会出现任何错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM