R Extension for Visual Studio Code

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
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.
Install the languageserver package in R.
install.packages("languageserver")
Install the R extension for VS Code from the VS Code Extension Marketplace or the Open VSX Registry.
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.
| |