简体   繁体   English

RStudio在Web浏览器中打开文档

[英]RStudio opens documentation in web browser

When I type in the name of the function the help box in RStudio I get the answer opened in the web browser instead of RStudio-help window. 当我在RStudio中输入帮助框的函数名称时,我会在Web浏览器而不是RStudio-help窗口中打开答案。 The same happens when typing in ?function for example ?which . 输入?function时会发生同样的情况?which While doing so I also get the following error in the console: 这样做时我也在控制台中收到以下错误:

> ?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

This happened after upgrading R to version 3.1.3 and I'm on Ubuntu 14.04. 这是在将R升级到版本3.1.3并且我在Ubuntu 14.04上之后发生的。

Does anyone know how to fix this - how to make RStudio open the documentation in RStudio window, not in the web browser? 有谁知道如何解决这个问题 - 如何让RStudio在RStudio窗口中打开文档,而不是在Web浏览器中?

RStudio needs to be upgraded to 0.98.1103 or newer version. RStudio需要升级到0.98.1103或更新版本。 The answer was taken from here 答案来自这里

in R, this works 在R中,这是有效的

options(help_type = "text")

in R Studio, you can open the file RStudio\\R\\Options.R and comment out this part (in my current version line 16-20): 在R Studio中,您可以打开文件RStudio\\R\\Options.R并注释掉这部分(在我当前的版本行16-20中):

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

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

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