如何在 Windows 中停止 R 中的命令

Adr*_*ian 6 r rstudio

我在 Windows 中使用 Rstudio。没有红色八角形供我点击。我试过在控制台中按 ESC 和 Ctrl + C 和 Ctrl + Z 但这些都没有用。

Sum*_*eek 6

运行代码时,红色八角形只会在它运行时显示。因此,当它只是运行您编写的代码(读取数据和事物名称等)时,八角形将不会显示。

按下ESC将起作用,除非 Rstudio 被冻结。

祝你好运!


nat*_*a_m 6

您还可以尝试通过菜单中断/终止 R 会话:
Session->Interrupt R

Session->Terminate R...

Session-> Restart R(Ctrl+Shift+F10)

如果没有其他帮助,请打开 Windows 命令行并终止进程rsession.exe

> tasklist | grep rsession
# the output should be something like this:
 rsession.exe                  7260 Console                    1    166,144 K
# The number (7260 in this case; will probably be different) is the process id (PID),
# and you can use it to kill the process:
> taskkill /F /PID 7260
Run Code Online (Sandbox Code Playgroud)

注意:这将强制停止 R 会话,并且 RStudio 可能必须重新启动(至少在我的机器上会发生这种情况)。