Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>R VS CodeNew to Visual Studio Code? Get it now.
R VS Code

R VS Code

SupporterREditor

|
36 installs
| (0) | Free
R Extension for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

R Extension for Visual Studio Code

Badge

This VS Code extension delivers comprehensive support for the R programming language, featuring an R language service powered by code analysis, interactive R terminals, data visualization, workspace variable inspection, help page viewing, package management, and full support for R Markdown documents.

The R and R Markdown syntax highlighting is provided by the sibling package vscode-R-syntax.

Visit the wiki to explore the complete extension documentation.

Getting Started

  1. Install R (version >= 3.4.0) on your system from cloud.r-project.org. Windows users are advised to enable "Writing R Path to the registry" during installation.

  2. Install the languageserver package in R.

    install.packages("languageserver")
    
  3. Install the R extension for VS Code from the VS Code Extension Marketplace or the Open VSX Registry.

  4. Create an R file and begin coding.

The following software and extensions are recommended to enhance your R development experience in VS Code:

  • radian: A modern R console that addresses many limitations of the standard R terminal and provides advanced features including syntax highlighting and auto-completion.

  • VSCode-R-Debugger: A VS Code extension that adds comprehensive R debugging capabilities.

  • httpgd: An R package that provides a graphics device capable of asynchronously serving SVG graphics via HTTP and WebSockets.

For detailed installation instructions, visit the installation wiki pages: Windows | macOS | Linux.

Features

  • Code Snippets for R and R Markdown.

  • R Language Service: Code completion, function signatures, symbol highlighting, document outline, code formatting, go to definition, diagnostics, find references, and more.

  • Interacting with R Terminals: Send code to terminals, manage multiple terminal sessions, and work with remote servers.

  • Package Development: Build, test, install, load all, and other commands from devtools.

  • Keyboard Shortcuts: Built-in and customizable keyboard shortcuts for efficient R development.

  • Workspace Viewer: Environment pane displaying global variables in the attached R session.

  • Help Pages Viewer: View R help pages and search help topics seamlessly.

  • Package Management: Install and remove R packages with ease.

  • Session Symbol Hover and Completion: Access symbol information and completion from your active R session.

  • Data Viewer: View data.frame or matrix objects in a grid format, or explore list structures in a tree view.

  • Plot Viewer: PNG file viewer and SVG plot viewer powered by httpgd.

  • Webpage Viewer: View htmlwidgets such as interactive graphics and visual profiling results.

  • Browser Viewer: View interactive Shiny applications.

  • R Markdown Support: R Markdown chunk highlighting, chunk navigation, execution commands, and document preview.

  • RStudio Add-in Support: Run supported RStudio add-ins in VS Code with an active R session.

  • Full Support for Remote Development: Work seamlessly via SSH, Containers, and WSL.

  • Live Share Collaboration: Share workspace, terminal, and viewers for collaborative R pair programming.

Questions, Issues, Feature Requests, and Contributions

  • General Questions: If you have questions about using the extension, please ask on Stack Overflow using the appropriate tags.

  • Bug Reports and Feature Requests: If you encounter a problem or have a feature request, please check existing issues to see if you can upvote a related issue, or file a new issue.

  • Contributions: Contributions are always welcome! Please review the contributing guide for detailed information on how to contribute.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft