Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you change the version of R running in Visual Studio 2017?

I would like to run R version 3.4 instead of the current, 3.3.2, and don't really know where to begin.

Web searches left we with little, perhaps, though, because I am not used to working on the Windows 10 platform and don't fully understand how the components in Visual Studio are layered.

like image 695
user1603472 Avatar asked Dec 02 '22 11:12

user1603472


1 Answers

RTVS should detect all the versions of R you've got installed on your machine, in which case @pwjvr's answer is correct. You should be able to click on the workspace item in the corner and choose a different version to switch to. A "workspace" is what RTVS calls a specific R installation that can be used to run your code.

In the situation where RTVS doesn't detect R, you can add it manually. Go to the workspace window (R Tools -> Windows -> Workspaces). This should pop up a window like the one below.

enter image description here

Click on Add, and fill in the entries:

  • Entry name: name you want to give this workspace
  • Host URL or path: location of the R install, eg C:\Program Files\R\R-3.4.1
  • R command line arguments: any arguments to pass to the R binary. Generally you can leave this blank.

enter image description here

like image 153
Hong Ooi Avatar answered Dec 04 '22 00:12

Hong Ooi