简体   繁体   中英

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. The same happens when typing in ?function for example ?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.

Does anyone know how to fix this - how to make RStudio open the documentation in RStudio window, not in the web browser?

RStudio needs to be upgraded to 0.98.1103 or newer version. The answer was taken from here

in R, this works

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):

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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