-
Notifications
You must be signed in to change notification settings - Fork 130
Getting Started
For many R users, RStudio has long been a great integrated development environment for data analysis and visualization. It provides a rich set of features that make it unprecedentedly easy to perform a wide range of tasks interactively.
VSCode, in contrast, is not specifically designed for a certain programming language. It is highly customizable through settings, and highly extensive through extensions. It supports many programming languages at different levels through language extensions that implement some common protocols such as the Language Server Protocol to enable language features based on code analysis such as Go To Definition and Rename symbol, and the Debug Adapter Protocol to enable interactive debugging of any target.
This vscode-R extension is a front-end extension that attempts to make it easier to work with R sessions interactively in VSCode. It is not intended to be a drop-in replacement of RStudio yet could be found useful by those who want a unified development environment to work with multiple programming languages such as R, Python, C++, etc., and those who need to work with self-managed R sessions or multiple R sessions at the same time.
To make VSCode a better code editor for R, we recommend that you install all the following packages:
- vscode-R: Provides extended syntax for R and R Markdown and interactivity between VSCode and R terminal.
- languageserver: An R package that implements the Language Server Protocol for R to provide a wide range of language analysis features such as auto-completion, function signature, documentation, symbol highlight, document outline, code formatting, symbol hover, diagnostics, etc.
- vscode-r-lsp: R LSP Client to communicate VSCode and R Language Server.
- radian: A modern R console that corrects many limitations of official R terminal and supports many features such as syntax highlighting and auto-completion.
However, the astounding flexibility of VSCode comes at a cost that some RStudio users might not find enjoyable in the beginning: Some setup and configuration are needed to make each part work well together. To minimize that cost, please refer to the installation guidelines on the right side and see the installation instructions we provide in details on Windows, Linux and macOS.
- Getting Started
- Installation
- Configuration
- Features
- Package development
- R Markdown
- Contributing
- FAQ