Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R - get help in browser instead of the in-build R helper

Tags:

r

I've seen two different behaviours of R help (when you type ?density for example):

  • help is open in your default browser
  • help is open in in-build R helper (window within R)

I currently have the second behaviour, but I would like to open the help in the browser. Can I somehow easily switch between these two behaviours? Without re-installation. Ideally, setting some R option.

like image 370
Tomas Avatar asked Oct 23 '12 07:10

Tomas


2 Answers

options(help_type = "html") # open help in browser
options(help_type = "text") # open help internally
like image 197
Tomas Avatar answered Nov 05 '22 19:11

Tomas


If anyone is having this problem in OSX you may need to follow this process (apologies I can't remember where I found this):

  1. edit /Applications/RStudio.app/Contents/Resources/R/Options.R (e.g. nano ...)

  2. comment out the entry as follows:

# options(browser = function(url)
# {
# .Call("rs_browseURL", url) ;
# })
like image 37
geotheory Avatar answered Nov 05 '22 19:11

geotheory