Skip to content

Installation: Linux

Kun Ren edited this page Jun 17, 2021 · 11 revisions

1. vscode-R

Install vscode-R in VS Code by searching ikuyadeu.r in extension marketplace.

If your R installation is from CRAN, then the default settings should work out of the box. Otherwise, you may have to change r.rterm.linux to the path to your R executable, which will be executed on command Create R Terminal.

If you are interested in the experimental features provided by R session watcher, you may enable it in the VS Code settings:

{
  "r.sessionWatcher": true
}

2. languageserver

languageserver is an implementation of the Language Server Protocol for R.

Run the following commands in R.

You may install the latest stable release from CRAN:

install.packages("languageserver")

or install the development version with the newest features:

remotes::install_github("REditorSupport/languageserver")

3. vscode-r-lsp

Install vscode-r-lsp in VS Code by searching reditorsupport.r-lsp in extension marketplace.

If the R installation is from CRAN, then the default settings should work out of the box. Otherwise, you may have to change r.rpath.* to the path to your R executable, which will be executed to start the R Language Server as a background process.

4. radian

radian is highly recommended as the R terminal for interactive use. It requires Python which should be available on most Linux distributions out of the box.

To install it globally:

pip install -U radian

Or if you don't have root privilege, you may want to install it only for yourself:

pip install --user radian

You may run which radian to see where your radian executable is located.

Then the following VS Code settings should be updated to properly use radian as the default terminal. If your radian is installed only for user:

{
  "r.bracketedPaste": true,
  "r.rterm.linux": "/home/user/.local/bin/radian"
}
Clone this wiki locally