Migration from RStudio v0.99 + R-3.2 to RStudio v1.1 + R-3.4

Our organisation is on the verge of migration from RStudio v0.99 with R-3.2 to RStudio v1.1 with R-3.4. The problem is that when you mix and match those, bad (but not terribly serious) things happen: RStudio v.099 + R-3.4 throws a warning that the R graphics engine version 12 is not supported, and so the plots tab is disabled. RStudio v1.1 with R-3.2 asks to update markdown and associated packages when creating new markdown documents. The latter isn't ideal when we're trying to control versions of packages with each R release, and the former is just inconvenient.

We could install RStudio v1.1 into a distinct (versioned) directory e.g. C:/program files/RStudio_v1/... so that's not a big deal.

It seems that RStudio is a little too clever in remembering what version of R it was last using, so if I have both versions of RStudio installed locally, I need to be careful to either CTRL + click launch to select the R version, or check what version is loaded (via the console) when RStudio starts. If you're paying attention when you start RStudio, this isn't a big deal, but I'm concerned for some of my colleagues who might not be aware or paying attention and could end up getting tied in knots over something like this.

So here's are the questions:

  • Is there a way to "hard code" what version of R is used with RStudio on invocation via a command line or shortcut option i.e. without CTRL + click launching?

  • If not, can we remove the configuration setting / appropriate file defining the R version without removing other user settings? i.e. forcing the "CTRL + click launch" action from the command line / shortcut on each invocation?

It seems you are using RStudio desktop, correct? RStudio Server Pro has support for multiple concurrent R versions in order to mitigate some of the issues you are facing. You can read more about that in the docs. Especially in an org of R users, I definitely recommend Server Pro from an "ease-of-administration" perspective.

I'm not quite sure how I would manage R version in the desktop environment... perhaps by munging around with the user paths? This article might give you some ideas:

Is there a RSTUDIO_WHICH_R equivalent for Windows?

SOLVED! With thanks to Phil Bowsher from RStudio...

In Windows:
In file C:\Users\Username\AppData\Roaming\RStudio\desktop.ini there's an entry there called RBinDir that their script can modify to cause RStudio to open with a particular version of R selected.

For our use, we can write a wrapper script for the two RStudio versions (v0.99 and v1.0) that edits the R version in this file so that we don't wind up with these problems of RStudio and R version mismatches.

1 Like