Better help window in rstudio

[This article was first published on R – kata helion, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

RStudio takes up a lot of screen real estate with its panes. I prefer to have two floating windows for script and console, plus help when needed. Unfortunately entering ?pch, for example, opens up a pane and squeezes everything out of the way for a too tiny help window by default.

I prefer the help in a separate pop out window (for instance, in a browser). options(help_type = "html") does nothing as far as I can tell in RStudio.

For a while, I had taken to opening a separate instance of R (directly from Rgui.exe) and using it just for accessing help, but this is kind of annoying for obvious reasons.

By the way you can make a shortcut for Rgui.exe (or change the existing shortcut in the start menu) and add the option --sdi to get rid of the antiquated windows default IDE. I actually really like the default MacOS IDE, but it doesn’t seem to be under active development anymore and has quite a few crashes and bugs for me lately.

A full IDE alternative on Windows is using notepad++ and nppToR. This sends code directly from notepad++ to an R window with a keystroke (default F8). Even if this doesn’t appeal to you, notepad++ is great, has syntax highlighting and doesn’t die when opening very large text files.

You can also do something similar with vim and tmux and a plugin such as Nvim-R. (Other than RStudio this seems to be the only other way to set up the windows like this on Linux– let me know if you have alternatives though!) I’m not a complete lunatic, this was a pain to get going and even then kind of clunky. There are some advantages to GUI after all. Can you tell I’m a ratpoison fan? (If you’re curious, StumpWM is probably a better bet these days since it is a little more active. Also if you’re interested in lisp.)

If you really want to use RStudio, there is a suggestion on stackoverflow from geotheory to edit Options.R and remove a few lines. It looks like the code has changed slightly since the post– this is what I found in my options file for RStudio 2022.02.3 Build 492:

# custom browseURL implementation.
.rs.setOption("browser", function(url)
   .Call("rs_browseURL", url, PACKAGE = "(embedding)")

Note you might need admin privileges to change this file. As geotheory points out you also have to repeat this every time the options file gets updated by an RStudio install.

Seems to work for me.

The Rat Catcher, 1632 Johannes van Vliet

See also:

  1. La Londe KB, Mahoney A, Edwards TL, Cox C, Weetjens B, Durgin A, Poling A. Training pouched rats to find people. J Appl Behav Anal. 2015 Spring;48(1):1-10. doi: 10.1002/jaba.181. Epub 2014 Dec 2. PMID: 25451685.
  2. Schaverien A. “Magawa, Rat That Hunted Land Mines, Dies in Retirement.” The New York Times. 12 Jan 2022. Accessed: 2 Nov 2022.
To leave a comment for the author, please follow the link and comment on their blog: R – kata helion. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)