![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686a6d901bf31fd69e36d65_positron%20(1).png)
Nowadays, most data professionals choose either R or Python when it comes to a programming language of choice. But what if you need both? Do you have to constantly switch between environments and IDEs? That’s one option, sure, but leaves a lot to be desired.
To solve this problem, Posit came up with Positron IDE - a development environment for data scientists, supporting R and Python out of the box. The IDE is currently in public beta, meaning anyone can install it.
Today you’ll learn what this new IDE is all about and how it compares to existing solutions.
Want to work with Appsilon? Here’s our exact process for delivering impactful products.
Table of contents:
- Hello Positron IDE - Key Features You Must Know
- Running Code in Positron IDE - Tips and Tricks
- Frequently Asked Questions about Positron IDE
- Current Limitations and Future Potential
- Summing up Positron IDE
Hello Positron IDE - Key Features You Must Know
Positron is a next-generation data science IDE delivered by Posit. It’s still in active development, so it’s expected to see some features not working properly (more on this later). But, as mentioned in the introduction, it’s in public beta, which means you’re free to take it for a spin!
You can download the latest Positron release from the official GitHub releases page.
In essence, Positron is a fork of a famous IDE - Visual Studio Code. If you’re familiar with it, Positron should feel right at home. It has some neat features delivered out of the box, but you could configure most of these through plugins on a fresh VSCode installation.
Up next, let’s discuss some key features you must know about.
RStudio Meets Visual Studio Code
Here’s what you’ll see when you first launch Positron:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaeaa918f71adb2d060_AD_4nXdsSJi_ZPSBvmJ1FjILP70SS9zrD6UtNtDJnq0FLdNrIRhmXei2l47Ir4QdZdB64dr0fSeIeficuBml5ZSvfLHERHPyaCFhCNhSFhwddMwHXM_Nt2K6fHBDmIk6cKKDD68wM0Qk5bZkGlCMG2cMqCicYdgp.png)
It certainly looks like a combination of RStudio and Visual Studio Code! You’ve got your familiar sidebar for navigation and extensions, but also your four-panel view for code, console, plots, and variables.
The top left panel allows you to start working on your data science projects - either in R or Python, through a notebook or file. Positron automatically detects installed programming languages and their version, but also picks up any virtual environments you’ve previously created:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaae4901f69deb2db99f_AD_4nXfWhc2sAsZi-D_XiUVhaKtuzJvzk9AoQf2YZKcSLJ-GfqICzYOmvK0SiqOtiQFuZNqIsC98VW9mSQR_JePYzmhLZgoIJrz-miioGJ3_CtlXWtVkDJd5O3evI7pJQ824X1r82bz-rGIs7fGwInoIoqmq1-GK.gif)
Up next, let’s explore this multi-language and multi-format support in more detail.
Multi-Language Support
The big selling point of Positron IDE is that it comes configured for R and Python out of the box - Jupyter Notebooks included. This means you don’t have to set everything up from scratch, which in the case of R and Jupyter is not as easy as it sounds.
To create a new R script, click on the New File button on the welcome screen and select R File. Writing and running code works just like in RStudio - Command/Control + Enter will run the cell on which your cursor is located:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaae84b661ff494200e7_AD_4nXc-_y8qcZ97hq2vvhCrybn7MgKuQ7jkGIIoZZwITcY2-pri65Kfm64-XyQb4Kvj9P-mAdfsOCsGmOuM80b8IjgU7gLRd6EqIqCWEhxe44BvYx1N8xhGDWRM5lKYYVBI7334gjSutBGFHUMS_-yuoFG35bC7.png)
The same approach to writing and running code works in Python scripts - write any code block you want and hit Command/Control + Enter to run it:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaae23dc1b2a3dd8bd5f_AD_4nXewg8JTBHjvhXioCxzs4nJJv2q4dJLHxUXJpdSd6XrgbkH4-X5rBZCGi-frIpftVRj4UcgtZGXbWpsLcgsBsZYO6s0gEvf2dYT2LQfpWD6mGz_l3OFXwc07IR8LWDIUu63PR4uu9wPZLI62PCywRGzwK7Yr.png)
Still, we think Jupyter notebooks allow maximum flexibility. You can create a notebook with a default programming language profile (R or Python), but you can then change the language for each cell.
Because of this flexibility, you can also sprinkle text/markdown content between your cells to provide resources or explanations:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaea7bd4e8421f54156_AD_4nXfNn43BAyc6RgRcrLa-nv-M4dic0tTwMTGPijsztrLtxJO3nJ9t0KmFyddlQ3ytQh2SO9hbwqcwDeyFfSOCjIVfweZ4OlaCs5MNV3UxbtxTxHRf9tv-dgQ5MwepzwI_n_9pSLlpLiDkqY2oLvgoKWkuNBSc.png)
And that’s the basics of programming language and format support in Positron. Up next, let’s discuss some more advanced features.
Ark Kernel
Ark is an R kernel for Jupyter applications and is a default interface between R and the Positron IDE. Previously, you’d have to install IRkernel if you wanted to run R in Jupyter Notebooks. You also had the option to install Ark, but it now ships by default with Positron.
What Ark does for you is provide structured interaction between R language and Jupyter, enable IntelliSense features through the LSP server, and sophisticated step-debugging of R functions through a DAP server. Now, Ark doesn’t support breakpoints so far, but you can use `debug()`, `debugonce()`, or `browser()` as substitutes.
Let’s talk more about the IntelliSense part. For example, you can hit Tab to display autocomplete suggestions:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaae855a1ceb84d4b384_AD_4nXetxDUoahwiEmN4UWmffSEZh2wTr9oUmuBis-wulqjOMegkrR540EL3ifu2JwLAPSIvYGSK-Acq76t4t9Mh17SvLh0q8iTDXHSKfFE7LB6La5cMe3j3gWKyeRwJ0ZR_unE9I9GQooHpzlfEpQOQVQTHjFfX.png)
This also works if you want to, for example, list all functions available in a given package:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaef129e285a7697825_AD_4nXedwXUCbkM0bix7KuUt-vOG44JPQ2Pl3De4rNrVafCWYVMk4lfGYjppkUnaeyz7wiAoQk-jV8npa0X_zxacg5-fma-snsAwBw1OjVWANLCtLC_HKHCiwopBZDEQePLVeWdw_PcL0nMIEON7ociCmhICpy7D.png)
Sure, it’s nothing groundbreaking, and is something you’ll take for granted if coming from RStudio, but Jupyter and R don’t always work nicely. Ark kernel is a way to fix that, and thanks to Positron, you don’t have to install and configure it manually.
But by far the most important quality of life improvement for developers is box imports. Let’s talk about them next.
Box Imports
Box imports are somewhat of a mess in VSCode and RStudio. In VSCode, you can’t Control/Command + Click to get to the source function definition, and in RStudio, it only works when calling the function (not when importing it). Positron has thankfully solved this problem.
Here’s an example - we have a `my_square_function()` exported in `r_code/functions.R`:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaae963ed0622b2f13d9_AD_4nXfJf-l1DJpaH5aVLPg8eh__D6uXii7hcMK7W1sDz75zaacfxxRYOrxh-IMVDjGi4uN1guHUGJ6F16lKu5XaMXjTbIEFOgx--verLqfsKm0RamUYissCIpgKPJjf2wDdmfErstY9WR2BqEisalqtue3C_ysh.gif)
As you can see, you can now get to the function definition both from the import and from the function calls!
And that’s the basics of Positron for you! Up next, we’ll go over some tips and tricks for running code in this new IDE.
Running Code in Positron IDE - Tips and Tricks
Positron, being a mixture of RStudio and Visual Studio Code, combines the best features of both worlds. This section will take you through useful keyboard shortcuts and features for working with data.
Useful Shortcuts
While you don’t necessarily need to use keyboard shortcuts, they significantly improve developer productivity. The following image illustrates what it takes to run a single cell without keyboard shortcuts:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaae2f6dba8856974a65_AD_4nXcEHFoYrOqx0EHzhZ0zlc208dXDRg4kYzdDfhmPanx9C8sO5DulCovVyf8d-G2MhML_8RAyo67jn1y17ssQmKdHNYzE3lYoSPdEKMdnXfRypxpfWcD2xksjE_l18pLr3JbpcwW0KI_FDOaLkAftF_2kmKA.gif)
Manually clicking on the play button will become pretty annoying after a couple of iterations. Instead, you can opt for one of the following:
- Control + Enter: Run the current cell without creating a new one
- Shift + Enter: Run the current cell and create a new cell for the same programming language
While in a notebook environment, you might also find the following shortcuts useful:
- C: Copy cell
- X: Cut cell
- V: Paste cell
- D: Delete cell
- Command/Control + P: Navigate between files
Note that they are different from the usual jupyter notebook keyboard shortcuts, but you can see the full list of available shortcuts in Settings - Keyboard Shortcuts. Every shortcut is adjustable.
DataFrame Viewer
Dataframes are the core of all data science workflows, so having an IDE that can display all relevant information about them is a must-have feature.
Positron allows you to print the dataframe content to the R console by calling R-specific functions, such as `head()`:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaebfae4dc23476b628_AD_4nXfOw21GQgY_bbrKL3-FKXYZvFZvzIGnQJLUwhQnBoJO5lMVQ_bPsnzMwKv35MkSvhseJboPbDDmWQ4ncTurM3mVvHIWVjT1n_MzhDYfHEgiqxmrCinAJTANT_ml6Y2_eih3W3_qXKrTlzVZE6a-0y0zDDE.png)
But the more interesting feature is the dataframe viewer. Once your dataframe is declared, you’ll see it in the Variables panel. You can expand the variable to view all columns and their respective values, or you can click on the table column to inspect the dataframe in an Excel-like fashion:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaee9dfd3c0dbfb0dc0_AD_4nXe0SrlCjZKSZOrFgM5Wh66ROhIoW5tIKY_Kcz6W7zukyw6JqjsxoaK03pPcCT4gdE6yxo97QlGvMaUu3sNQT3NzBC9JXtvVFSGU1WaXiMV2LeN2H40I_B26Gumk6kmppXr7ANLljg512Wu1PUDkevsDtXBT.gif)
As you can see, you can sort the values, apply filters, inspect missing values, and much more - straight from the GUI.
Plot Viewer
An amazing feature of RStudio is the plot viewer. You have a dedicated panel for visualizations, and you can easily cycle through multiple charts. Positron has the same feature, arguably with a somewhat updated interface:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaec85bc91fa832c4cb_AD_4nXfpwFAHdJu3907fyyiCoCIHmlVsplOSxKNl9kCrb0_DdmZTbMDbj0kBiGnAGi6jm2eAuhZ_6VtAlUqjEFevLR9NGA8iQOaPmZ98NQmFDJr9dj8cM3DgZC3yHBjRUfldPRs22El-iAWeZE6Bvsx5t1gIRQqz.png)
Creating a new chart won’t delete the old one, as you can easily navigate between them using the right-side panel:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaeefa46f018e79d157_AD_4nXeX-yn4IAtk3RY0dcGpebUmO7dY5FPJJKStpZ6bQ-0JBMemx3-SBtfUHvEKQHqZ59twmJHsZtyqauTLo68D8rKEsRDVxUACCI_KG11k9aykylEfP5BKbmpbE9d6WSf2mcaPxT9N-3smOKg5eGmuWfXMfNA.png)
Up next, let’s discuss the powerful and improved variable inspector.
Variable Inspector
Being able to inspect complex objects, such as plots, is an essential feature for debugging code and making sure everything works as expected. RStudio also has this feature, but Positron allows you to dig deeper and has a sleeker-looking user interface:
![](https://cdn.prod.website-files.com/654fd3ad88635290d9845b9e/6686aaaefa59df2a8294abf4_AD_4nXdygjBAohwnswx4UYz4A4M47D0J5oLjrtnxX2D7ysjlQZIsfefg_WK_hjXaY6CdNep97XrNYqksyzzH5-gYbEfwBCQKFpWSiWBG8aAVhXXoJbAg35iqz8HPqOn48hso2D-ZwY1GQoGPfXCH9Im00WQIMqsV.gif)
As you can see, you can drill down into all the small pieces that are combined to make complex objects.
Want to stay up to date on the latest in R/Shiny and data science? Sign up for our weekly newsletter today!
Frequently Asked Questions about Positron IDE
Positron IDE is currently in open beta, so this section will answer the most commonly asked questions posted by the community.
Positron is a fork of VSCode, so why not just use VSCode?
R support in VSCode exists, but it tends to break every couple of patches due to interactions with other extensions. Positron solves this problem by supporting R out of the box and having a brand new Jupyter kernel, Ark, with blazing-fast IntelliSense. Additionally, plain VSCode doesn’t have a dedicated R console.
Is Positron a replacement for RStudio?
No, Posit is going to support both Positron and RStudio moving forward.
GitHub Copilot and Remote SSH plugins aren’t working - What can I do?
Positron IDE is currently in open beta, so you can expect occasional hiccups. Since it’s a VSCode fork, you’d expect that every VSCode plugin would work. That’s currently not the case for GitHub Copilot due to Microsoft licensing, A couple of other must-have plugins, such as Remote SSH and DevContainers also don’t work. The remote SSH plugin is in Posit’s roadmap for Positron, so they should have it sorted out soon.
Are all RStudio features supported in Positron?
Most RStudio features are available in Positron, but the support is currently lacking for inline Quarto output, R Markdown profiling, Sweave, RStudio Add-in support, and even for easy publishing Shiny/Quarto apps/reports to Posit Connect or Shinyapps.io.
Current Limitations and Future Potential
With everything said today, let’s now make a quick TL;DR of current limitations of the Positron IDE public beta release coming from RStudio or Visual Studio Code:
- Feature support - Unlike RStudio, Positron doesn’t support inline Quarto output, R Markdown profiling, Sweave, RStudio Add-in support, and support for easy app and report publishing.
- Plugin support - Positron is a fork of VSCode, but major VSCode plugins such as Copilot, Remote SSH, and DevContainers are not working (yet).
Still, Positron is currently in public beta, so it’s not 100% fair to compare it to a product that’s been in a stable release for years. Many things can, and hopefully will, change before it’s out for good.
Summing up Positron IDE
To summarize, Positron is a new IDE from Posit, the authors of RStudio. It’s not designed to be a replacement for RStudio, as both will be maintained moving forward. It’s a new product, aiming to be a one-stop-shop for data science workflows (R and Python). In the current public beta release, it’s still a bit rough around the edges, as the plugins we rely on daily simply don’t work for now. However, we're excited and look forward to the future improvements to Positron!
If you’d like to learn more about Positron, make sure to visit the official GitHub repository. If you want to take it out for a spin, download the latest version from their release page. We encourage you to do so, and also to share your feedback with us in our community, and with Posit.
Have you already tried the Positron IDE? Do you think it’s a viable RStudio/VSCode replacement for data science workflows? We’re eager to hear your opinion in our Slack community.
Looking to containerize your R Shiny application? This article reveals if you should go with Docker, Podman, or Singularity.
Contact us!
![Damian's Avatar](https://cdn.prod.website-files.com/6525256482c9e9a06c7a9d3c/668ffa9e26059fdf0cec0526_Screenshot%202024-07-11%20at%2017.30.06.png)