In VS Code, I want radian to open a particular R version when running R: Create R Terminal based on the VS Code settings. For example, I can set the workspace settings in one project to use R 4.1.1 but in another to use R 3.6.3.
So, in settings.json I used the following settings:
However, it always opens R 3.6.3. Based on here, I suppose that is because the binary to R version 3.6.3 and not R 4.1.1 is exposed in the PATH variable, and so Radian uses that automatically (and ignores r.rpath.windows).
I see that within settings.json, I can provide arguments to the command to open the terminal via r.rterm.option (as I understand it). So, I added the --r-binary argument to what was there already:
Hi. Thank you for the great console!
In VS Code, I want radian to open a particular R version when running
R: Create R Terminal
based on the VS Code settings. For example, I can set the workspace settings in one project to use R 4.1.1 but in another to use R 3.6.3.So, in
settings.json
I used the following settings:However, it always opens R 3.6.3. Based on here, I suppose that is because the binary to R version 3.6.3 and not R 4.1.1 is exposed in the
PATH
variable, and so Radian uses that automatically (and ignoresr.rpath.windows
).I see that within
settings.json
, I can provide arguments to the command to open the terminal viar.rterm.option
(as I understand it). So, I added the--r-binary
argument to what was there already:However, I then get the following error in the terminal (screenshotted before it disappears):
In addition, I get the following message in a pop-up dialogue box on the bottom right:
To note, I can run R 4.1.1 in the VS Code terminal by running the following command in a PowerShell terminal in VS Code:
I am on Windows 11 running VS Code version 1.63.2, with vscode-R version 2.3.6.