install.packages(c("languageserver", "rlang"))
5 IDEs
An Integrated Development Environment (IDE) is a software application that offers extensive functionality for programmers, including ability to read, write, and execute code, develop and test software packages, etc.
IDEs that support R usually also allow viewing plots or launching web applications within the same environment. An IDE can make working in R easier, more productive, and, importantly, more fun.
5.1 VS Code
Visual Studio Code, a.k.a. VS Code, is a source code editor and one of the most popular IDEs across different languages. The VS Code Extension Marketplace includes a very large number of extensions.
The ‘vscode-R’ extension allows using VS Code as an R IDE. To use it, you need to install the languageserver
and rlang
packages:
The httpgd
graphics device is recommended.
Install it using:
install.packages("httpgd")
and enable it in the extension settings (“Plot: Use httpgd”).
The ‘Remote - SSH’ extension allows using a local VS Code installation (e.g. on your laptop) and executing code (R, Python, etc.) on a remote server on which you have SSH access.
VS Code’s ‘Jupyter’ extension allows you to open and run jupyter notebooks.
Read more about R support in VS Code here
5.2 Positron by Posit
Positron is “a next-generation data science IDE” built by Posit. First public release was made available on June 24 2024 and as stated in the GitHub repo “is an early stage project under active development”. This is a new IDE by the developers of RStudio built on top of VS Code open source (“Code OSS”). May be too new and untested for beginners, who might benefit from sticking with RStudio for the time being. May be fun to try for more experienced users and those already familiar with VS Code.
5.3 Jupyter / Jupyter Lab
Jupyter is a popular notebook interface, which supports multiple programming languages, including R.
JupyterLab is the “next-generation web-based user interface for Project Jupyter”.
Jupyter and JupyterLab are installed using Python, but can be used to work with multiple languages, including R.
Python environments are a way to isolate your project’s dependencies from the rest of your system. This is useful when you have multiple projects with different dependencies, or when you want to avoid conflicts between packages. There are different approaches to installing Python packages & managing environments. Our current recommendation is to use virtual environments and handle dependencies using uv
, which is a much faster alternative to the classic pip
. The alternative is to use conda
or
5.3.1 Using uv
& pip
(recommended)
Create a new virtual environment named, for example, myenv
:
python3 -m venv myenv
Activate your new virtual environment:
source myenv/bin/activate
Install uv
, a faster alternative to pip
:
pip install uv
Install jupyterlab:
uv pip install jupyterlab