2

Consider this in ~/.Rprofile or path/to/project/.Rprofile:

.First <- function () { 
  options(browser="firefox")
  cat("Browser:", getOptions("browser"), "\n")
}

(Re)Starting R within RStudio prints at the console at least the following:

Browser: firefox

Unfortunately, the option browser seems to become overwritten:

getOption("browser")
function (url) 
{
    .Call("rs_browseURL", url)
}
<environment: 0x4688c30>

This does not happen in an R session started from e.g. bash.

System information: RStudio 0.98.953, R 3.1.1, Linux Mint x86_64

So my question is:

How to assign options("browser") at startup without being modified by RStudio?

Also I like to know which other options RStudio sets to its defaults.

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
setempler
  • 1,681
  • 12
  • 20
  • 1
    you can set your `Rprofile.site` file. – agstudy Sep 30 '14 at 16:01
  • There seem to be no difference between `.Rprofile` and `.Rprofile.site` concerning my question/problem. Neither mentioned in `?Startup` nor when I added the site file (and also removed `.Rprofile`). – setempler Sep 30 '14 at 20:00
  • Bill Venables also found his R environment not matching settings in `.Rprofile` and `.Renviron` as he mentioned [here](http://flowingdata.com/2011/03/02/rstudio-a-new-ide-for-r-that-makes-coding-easier/). I also tried setting `R_BROWSER` without success. – setempler Sep 30 '14 at 20:23

0 Answers0