RStudio 在网络浏览器中打开文档

RStudio opens documentation in web browser

当我在 RStudio 的帮助框中输入函数名称时,我得到的答案是在网络浏览器中打开的,而不是 RStudio-help window。输入 ?function 例如 ?which 时也会发生同样的情况。在这样做的同时,我还在控制台中收到以下错误:

> ?which
Error in (function ()  : attempt to apply non-function
Error in (function ()  : attempt to apply non-function
Error in (function ()  : attempt to apply non-function

这是在将 R 升级到版本 3.1.3 之后发生的,我在 Ubuntu 14.04。

有谁知道如何解决这个问题 - 如何让 RStudio 在 RStudio window 而不是在网络浏览器中打开文档?

在 R 中,这有效

options(help_type = "text")

在 R Studio 中,您可以打开文件 RStudio\R\Options.R 并注释掉这部分(在我当前版本的第 16-20 行):

# custom browseURL implementation
options(browser = function(url)
{
    .Call("rs_browseURL", url) ;
})

RStudio 需要升级到 0.98.1103 或更新版本。 答案取自here