Skip to content

Latest commit

 

History

1,347 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R Extension for Visual Studio Code

Release Development version CI

This VS Code extension provides support for the R programming language, including features such as R language service based on code analysis, interacting with R terminals, viewing data, plots, workspace variables, help pages, managing packages, and working with R Markdown documents. See the wiki for full documentation.

The R and R Markdown syntaxes are located in a sibling package vscode-R-syntax.

What's new in 3.0.0-rc

v3.0.0 of the R Extension for VS Code is a major release. It introduces a significant architectural change via the sess R package, which powers faster and more robust communication with the underlying R session. sess is bundled with the extension and installed automatically if it is missing or outdated, so no manual setup is needed.

Quickstart

  1. Install R (>= 3.4.0) on your system. On Windows, we recommend letting the installer write the R path to the registry.

  2. Install the languageserver package from R.

    install.packages("languageserver")
  3. Install the stable release of this extension from the VS Code Marketplace or the Open VSX Registry.

    code --install-extension REditorSupport.r

    Alternatively, you can test the latest development version by installing from GitHub:

    Install the development version

    The latest pre-release is rebuilt from every push to master. Download and install it:

    curl -fsSL -o vscode-R.vsix \
      https://github.com/REditorSupport/vscode-R/releases/download/latest/vscode-R.vsix
    code --install-extension vscode-R.vsix
  4. Create an R file and start coding! (Click Yes if prompted to install sess.)

Recommended extras

Steps 1–3 above are all that's required to get started with R in VS Code. But we also recommend the following software for a fully optimized R + VS Code experience:

  • Install an interactive plotting backend for a better R graphics experience:

    • jgd: Lightweight JSON graphics device with native vscode-R integration.
    • httpgd: SVG-based graphics device served via HTTP and WebSockets.
  • arf: A modern R console with many features: syntax highlighting, multiline editing, vi/emacs keybindings, R version switching, etc. Successor to radian written in Rust.

  • Complementary VS Code extensions:

    • Quarto: the official Quarto plugin for VS Code.
    • VSCode-R-Debugger: enables VS Code's debugging facilities for R scripts.

For example, assuming that you have installed arf and jgd, your user settings.json might include:

{
    "r.consolePath": "arf",
    "r.bracketedPaste": true,  // recommended for arf (and radian)
    "r.plot.backend": "jgd"    // "auto" already prefers jgd, then httpgd
}

Please consult the relevant installation wiki pages for your OS (Windows | macOS | Linux) for more detailed instructions.

Features

Questions, issues, feature requests, and contributions

Releases

Packages

Used by

Contributors

Languages