Getting Started with Positron

A guided tour of Posit’s new data science IDE

positron
Author
Affiliation

Jelmer Poelstra

Presented on

August 27, 2026

Page last modified

August 25, 2026



1 Introduction

1.1 What we’ll cover

Every Code Club session so far has used RStudio. Today we’ll spend the session in a different program: Positron, a newer data science IDE from Posit, the same company that makes RStudio.

By the end of the session, you should be able to open your own work in Positron, find your way around, and decide for yourself whether you want to keep using it. Specifically, we’ll cover:

  • Installing Positron and opening a folder
  • Touring the interface
  • Exploring data — the Data Explorer, Variables pane, and Plots pane
  • Customizing Positron — keyboard shortcuts, settings, and extensions

1.2 Why is there a new IDE?

Basically, Posit wanted better support for other programming languages, particularly Python, alongside R. This turned out to be harder with RStudio than starting fresh, so they created a new IDE: Positron.

Positron is built on Code OSS, the open-source version of the popular general-purpose code IDE called Visual Studio Code (VS Code). It adds data science features that RStudio has but VS Code does not, such as a Variables pane, a Plots pane, and a Data Explorer.

Discussion

  • Which languages do you use besides R — Python, bash, SQL, none?
  • Has anyone tried Positron already? Did you stick with it?
  • Do you consider yourself familiar with the basics of RStudio?

1.3 Why should you consider switching?

If you use Python alongside R, or are already familiar with VS Code, Positron is a natural choice and I’d strongly recommend switching.

If you use R only, you may not need to switch, but should still consider it, because:

  • New features: While Posit has committed to maintaining and updating RStudio, major new features are now going to Positron first. And some features may never make it to RStudio, because Positron is more adaptable.

  • AI support: This is much more flexible in Positron, where you can connect to different model providers and subscriptions, and even use Claude Code. In RStudio, you can only use AI via a Posit AI subscription. We’ll demonstrate using AI assistance in Positron in the next session!

And two more minor points:

  • Data Explorer: Positron’s Data Explorer can open data files (CSV, Excel, etc.) directly, without having to load them in R at all.

  • Remote connections: A niche feature, but it was important to me: Positron can be connected to the Ohio Supercomputer Center and any other remote server. This isn’t possible with RStudio and while you can use RStudio directly at OSC through OSC OnDemand, this has its downsides. (Happy to expand on this for any OSC users!)

1.4 Before we start

If you haven’t done so already, please:

  1. Install Positron: download the appropriate installer from the download page, and run it. There are installers for Windows, macOS, and Linux.

  2. Make sure you have a recent R (4.4.0 or higher) installed; Positron does not come with its own copy of R.

ImportantUsing an OSU-managed computer and have no admin rights?

You should still be able to install Positron, just do so at the user level rather than system-wide.

On a Mac, this involves dragging the Positron app into your User Applications folder, /Users/<username>/Applications (i.e. this Applications folder is in the same parent folder as your Documents, Downloads, and Desktop folder).

On Windows, the Positron installer has a “User install” option. Look for a checkbox or dropdown labeled “Install for me only” (vs. “for all users”) during setup — that keeps the install in your user profile without needing admin rights.

2 Getting started

Go ahead and start Positron! It should look something like this:

Screenshot of the Positron IDE, with the Editor, Console, and various panes

2.1 Opening a folder (replaces RStudio Projects!)

When you first start Positron, you should see something like what’s shown in the screenshot on the right, prompting you to open a folder.

“Opening a folder” is Positron’s equivalent of opening an RStudio Project. The idea is the same: a folder is a self-contained workspace, and opening it sets your working directory and gives you a fresh R session.

But instead of requiring the special .Rproj file that is created when you make an RStudio Project, Positron simply treats any folder you open as a project.

Let’s create and open a new folder for today’s session:

Positron welcome screen, with a button to open a folder

  1. Create a new folder on your computer. You can create it in any way, such as with your File Explorer / Finder.

    I would suggest putting this folder within a folder for Code Club, for example: Documents > codeclub > positron (or put another way: ~/Documents/codeclub/positron).

  2. Open this folder in Positron by clicking the Open Folder button shown above1.

  3. Positron will reload and ask whether you want to trust the folder. Click Yes, I trust the authors and optionally check the box above it.

Positron dialog asking whether to trust the folder you just opened

The dialog for trusting a folder.

Why are Projects or open folders needed? These encourage good practices:

  • Keep each research project in its own self-contained folder
  • Use paths relative to the folder root, not absolute paths
  • Avoid using setwd()

They also make a lot of Positron’s features work better, such as the Explorer, Search, and version control support.

NoteMore on RStudio Projects vs. Positron folders

If you open a folder that already contains an .Rproj file, Positron simply ignores the file. So a folder can work as both an RStudio Project and a Positron workspace, which is perhaps handy while you’re trying Positron out.

The good thing about Positron’s mechanism is that you’re practically forced to use it, whereas in RStudio using Projects is optional and easy to skip or not know about.

2.2 Starting an R session

Near the top-right corner of the Positron window is the so-called interpreter picker, which lets you choose which installation of R (or Python) to use for your session.

If Positron found your R installation, it may have started a session already — then it would look like something on the right (with the R version number corresponding to what you have installed).

Screenshot of the Positron interpreter picker

The interpreter picker.

If not, click the picker, and choose your version of R (you may have to click New Console Session before you see the options).

Screenshot of the Positron interpreter picker with options

The dialog for selecting an interpreter after you click the picker.
NoteMore on R and Python sessions in Positron

The picker lists every interpreter Positron can find, which could include several versions of R and Python.

Two nice features of Positron:

  • Switching between R versions is a single click here, which is considerably easier than in RStudio.
  • You can also have several sessions running at once. Say, an R session and a Python session, or two R sessions on different R versions.

On the other hand, if you’re an R user only and have no need to switch between different R versions, you might prefer the simplicity of RStudio’s approach.

Once a session is running, the R Console works just like in RStudio. Try it:

1 + 1
[1] 2
head(iris)
  Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1          5.1         3.5          1.4         0.2  setosa
2          4.9         3.0          1.4         0.2  setosa
3          4.7         3.2          1.3         0.2  setosa
4          4.6         3.1          1.5         0.2  setosa
5          5.0         3.6          1.4         0.2  setosa
6          5.4         3.9          1.7         0.4  setosa

Screenshot of the Positron console, showing a simple calculation and the head of the iris dataset

The Positron console.

Exercise


A) Confirm your working directory

Confirm that opening a folder really did set your working directory: run getwd() and check that the path matches the folder you opened.

B) Try running two sessions

Start a second R session from the interpreter picker (click the picker, then New Console Session). You likely only have a single R version installed, and can pick the same version for the second session.

You should now have two Console sessions, and you can see this as shown in the screenshot:

Screenshot of Positron with two console sessions

Two console sessions in Positron: R 4.6.0 is shown twice, and each of these is a session.

Click on the second (bottom) session, and run:

x <- 1

Then switch back to the first session, and run:

x
Error:
! object 'x' not found

If you get the above error, that means the two sessions are independent: objects created in one session do not exist in the other.

2.3 Packages and a script

We’ll use the flights dataset from the nycflights13 package: every flight that departed New York City in 2013. I picked a relatively large dataset, so we can see some of the nice features of the Data Explorer later.

First, let’s install the packages we need:

install.packages("tidyverse")
install.packages("nycflights13")
TipAlready have these packages installed?

If you already have them or think you do, you can skip the installation step and try running the library() calls below directly. Alternatively, it won’t hurt to run the install.packages() calls again — R will simply check that you have the latest version and skip the installation if you do.

Now, let’s create a new R script:

  • This can be done in several ways, but here is one: Click File (or the “New” button) > New File..., then select “R File”.

  • Save it right away (File > Save or Save As, or Cmd/Ctrl+S) in your current folder as explore.R.

I recommend that you add all the code below to this script, and run it from the script (instead of typing it into the console).

Load the two packages we’ll use:

library(tidyverse)
library(nycflights13)

Run the code with Cmd/Ctrl+Enter — the same shortcut as in RStudio. Also as in RStudio, this moves the cursor down after running the current line (or your selection of a part of a line or multiple lines).

2.4 The Command Palette

The Command Palette is Positron’s main way to access the program’s functionality. It may take some getting used to, but is very handy and powerful.

To open the Command Palette, press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows).

A search box will appear at the top of the window: start typing what you want to do, and Positron will fuzzy-match it against every piece of functionality (command) it knows. Here are some things you might think of looking for in the Command Palette:

  • Type themePreferences: Color Theme
  • Type restartInterpreter: Restart Active Interpreter Session
  • Type settingsPreferences: Open Settings (UI)
TipKeyboard shortcuts

Pay attention to the keyboard shortcuts it shows next to each command that has one. For commonly used commands, it’s worth learning the shortcut so you can skip the palette next time.

Side note: RStudio has a Command Palette as well, but it’s more essential in Positron, because Positron has fewer menus and buttons, but more options.


Exercise: Find your way around

Use the Command Palette to do the following:

  1. Change the color theme to something you like better than the default.

  2. Restart your R session, then run ls() in the console to confirm that your workspace is now empty.

  3. Run your whole script (there’s a command for this — find it!).

Click here to see hints

For each of these, open the palette with Cmd/Ctrl+Shift+P and type:

  1. theme — look for Preferences: Color Theme, then use the arrow keys to preview themes live before hitting Enter
  2. restart — look for Interpreter: Restart Active Interpreter Session
  3. run — look for R: Run R File in Console or similar

Notice how each of these showed you a keyboard shortcut on the right-hand side.

3 A tour of the interface

If you’ve used RStudio before, Positron’s layout should feel broadly familiar. There’s an editor to write code, a console to run it, and various panes to display results. But several things have moved, and there are some aspects without an RStudio equivalent.

Your interface should currently look something like this:

Screenshot of the Positron IDE, with the Editor, Console, and various panes

3.1 The five regions

Diagram of the Positron interface, with the five regions labeled: Editor, Panel, Activity Bar, Primary Side Bar, Secondary Side Bar. Image from <https://positron.posit.co/layout.html>

Region Where What’s in it
Editor Center - top Open scripts and other documents, in tabs
Panel Center - bottom R console and Terminal
Activity Bar Far left Icons that switch what the Primary Side Bar shows
Primary Side Bar Left Explorer (files), Search, Source Control, Extensions, Packages
Secondary Side Bar Right Variables, Plots, Help, Viewer, History, Connections

Almost every pane in Positron can be resized (like in RStudio) and dragged somewhere else (much more flexible than in RStudio). There are also layout presets.


Exercise: Modify the layout

  • Resize panes such as the Primary Side Bar and the Editor.

  • Drag the Help tab down to the bottom, next to the Console, and see whether you prefer it there. Drag it back if you want.

  • Try moving something else. If you make a mess of things, you can always get back to the default layout with the View: Reset View Locations command.

  • Explore the presets: Open the Command Palette (Cmd/Ctrl+Shift+P) and type layout. Select “Customize Layout…” and you should see several options for layout presets. Try them.

  • The Customize Layout dialog also lets you hide or move regions — these options are below the presets. For example, try clicking on Activity Bar to hide it.

Screenshot of the Positron Customize Layout dialog

The Customize Layout dialog

In RStudio In Positron
Source pane Editor (center)
Console Console (bottom)
Environment Variables pane (right)
Plots Plots pane (right)
Help Help pane (right), or press F1 on a function
Files Explorer (Activity Bar, far left)
Packages Packages pane (Activity Bar)
Git Source Control (Activity Bar)
Viewer Viewer pane (right)
Terminal A tab next to the Console
History History pane (right)
Build No pane — use the Command Palette
View(df) data viewer Data Explorer (opens as an editor tab)

3.2 The Activity and Primary Side Bars

The Activity Bar is the strip of icons on the far left. Clicking an icon swaps out what’s shown in the Primary Side Bar right next to it. Among the options are:

3.2.1 Explorer

The Explorer (the top icon, looks like stacked documents) shows the folders and files in your currently open folder. Clicking a file will open it in the Editor.

This is Positron’s equivalent of RStudio’s Files pane, but a bit nicer as you can see the whole project’s structure at once and expand/collapse subfolders.

TipA faster way to jump to a file: Cmd/Ctrl+P

Especially when your project has many subfolders and files, it can be tedious to click through the Explorer tree to find a file. The Go to File feature is a faster way to jump to a file in your project, as long as you know part of its name (this is similar to RStudio’s Go to File/Function).

Try it: press Cmd/Ctrl+P and type expl — your explore.R script should be the top hit. Press Enter to jump to it.

Exercise: Search and replace

  1. Create a second script in your folder, plots.R with these two lines in it:

    library(tidyverse)
    
    # TODO: plot the distribution of arr_delay for the flights data
  2. Now that your project has two files, use Search to look for tidyverse again, paying attention to how the results are reported and organized.

  3. Type tidymodels in the search box’s replace field: Positron previews every change it would make, right in the results list. Have a look — then clear the replace field, since we don’t actually want to rename anything.

3.2.3 Other sidebar options

There are a few more icons in the Activity Bar:

  • Source Control: for Git (also much improved over RStudio’s Git pane!)
  • Run and Debug: for debugging code
  • Remote Explorer: for remote connections
  • Extensions: for installing add-ons — more on that in a minute
  • Testing: for running tests on your code
  • Packages: lists installed R/Python packages (Positron’s equivalent of RStudio’s Packages pane)

Bonus exercise: Explore the Packages pane

Click on the Packages icon (cube shape) in the Activity Bar, and you’ll see every package installed in your library, with:

  • its version, and whether it’s attached (i.e. you ran library() on it)
  • a filter to show only outdated packages
  • buttons to install, update, and remove packages
  • links to each package’s documentation and website

Explore this and try, for example, to filter to outdated packages (if any), and optionally update one or two of them.

4 Exploring data

Now, we’ll use the flights data to explore some of Positron’s data exploration features.

To start, nycflights13 provides the flights data frame, but it won’t show up as an object in your environment yet. Add the following line to explore.R and run it:

flights <- flights

4.1 The Variables pane

Look at the Variables pane on the right: flights should now be listed there. It’s the equivalent of RStudio’s Environment pane, and like there, you can expand objects to look inside them by clicking the arrow next to an object’s name.

Try expanding flights. You should see each column, its type, and a preview of its contents.

Screenshot of the Positron Variables pane, showing the flights data frame

4.2 The Data Explorer

The Data Explorer is Positron’s equivalent of RStudio’s View() function, but with a lot more functionality. Click the small table icon next to flights in the Variables pane, and it should open as an editor Tab and look something like this:

Screenshot of the Positron Variables pane, showing the flights data frame with a small table icon next to it

The Data Explorer has three parts:

  • The data grid — the spreadsheet-like view of your rows and columns
  • The summary panel — per-column statistics and a small distribution plot. May be hidden by default: if you don’t see it, look for an arrow on the left-hand side of the spreadsheet view.
  • The filter bar — for temporarily filtering rows

4.2.1 Sorting and filtering

  • Sort by clicking the three dots in the column header and picking Sort Ascending or Sort Descending.

  • Filter by clicking + Add Filter in the filter bar, picking a column, and choosing a condition. You can add several filters, and they will combine.

Sorting and filtering in the Data Explorer does not change the dataframe in your R session, but there is a “Convert to Code” button (!) that generates the R code to reproduce your filter and sort.

Screenshot of the Positron Data Explorer, showing the Convert to Code button

Above: When you’ve applied one or more filters, the Convert to Code button is activated (no longer grayed out).

Right: After clicking Convert to Code, you should see a popup with the generated R code.

Screenshot of the Positron Data Explorer, showing the generated R code

Exercise: Explore the flights data

Use the Data Explorer to answer these:

  1. Which column has the most missing values? (Hint: the summary panel shows a missing-value percentage per column.)

  2. How many distinct airline carriers (carrier) are in the data?

  3. Filter to flights that departed from JFK and had a departure delay (dep_delay) of more than 120 minutes. Roughly how many rows are left? (Look for the row count displayed in the Data Explorer — it reflects your active filters.)

  4. Sort those filtered flights by dep_delay, descending. What was the single worst departure delay out of JFK, in hours?

  5. Use the Convert to Code button to get code corresponding to what you did in steps 3 and 4, and copy it into your explore.R script.

4.2.2 Opening data files directly in the Data Explorer

You can open a data file directly in the Data Explorer, without any R code (this is a feature RStudio does not have at all). Let’s start by creating a CSV file from the flights dataset, so we have a data file to work with:

# Make a copy of the data as a CSV file, so we have a data file to work with
dir.create("data")
write_csv(flights, "data/flights.csv")

Next, open data/flights.csv via the Explorer or with Cmd/Ctrl+P. The file will open directly in the Data Explorer! And this will also work for .tsv and even .xlsx (Excel) files.

TipWant to see the raw text of a data file instead?

For plain-text files, if you want to see the raw text instead of the Data Explorer, click the “Open as Plain Text File” button:

Screenshot of the Positron Data Explorer, showing the Show Plain Text button

4.3 Plots

Let’s create a plot, so we can see where it appears. Copy the following code into the plots.R script and run it:

ggplot(flights, aes(x = arr_delay)) +
  geom_histogram(bins = 100, fill = "steelblue", color = "grey20") +
  geom_vline(xintercept = 0, color = "tomato1", linetype = "dashed") +
  scale_x_continuous(limits = c(-100, 300)) +
  scale_y_continuous(
    expand = expansion(mult = c(0, 0.05)),
    labels = scales::comma_format()
  ) +
  labs(x = "Arrival delay (minutes)", y = "Number of flights") +
  theme_bw(base_size = 14) +
  theme(panel.grid.minor = element_blank())
Warning: Removed 10041 rows containing non-finite outside the scale range
(`stat_bin()`).
Warning: Removed 2 rows containing missing values or values outside the scale range
(`geom_bar()`).

The Plots pane behaves much like RStudio’s, including the back/forward arrows through your plot history. Two things to try:

  • The expand button, which pops the plot out into a large editor tab.
  • Click the circle icon (to the right of “Auto”), and you should see options “Dark Filter” and “Follow Theme” (and the default “No Filter”): Dark Filter will show the plot on a dark background, and Follow Theme will match your color theme. Handy for those who prefer a dark theme for their IDE!
NoteThe Help pane

Like in RStudio, you can get help on a function by typing ?function_name in the console, or by putting your cursor inside a function name in your script and pressing F1. Give one or both methods a go with geom_histogram.

5 Customize Positron

Let’s finish by looking at some ways to customize Positron to your liking.

5.1 Extensions

Positron has many extensions (add-ins) that you can install, in large part because most VS Code extensions are compatible with Positron. To find and install extensions, click the Extensions icon in the Activity Bar (four blocks, with one set apart from the other three). Some useful ones:

Extension What it does
Code Spell Checker Underlines misspelled words in code and prose
Better Comments Color-codes certain comments by type (TODOs, questions, etc.)
Pastum Converts a table copied to your clipboard (!) 2
Indent Rainbow Colorizes indentation levels in scripts
Rainbow CSV Colorizes CSV columns when viewing as plain text
Air R code formatter
Quarto Quarto support
Tomorrow Night Bright (R Classic) The RStudio color theme
SVG Preview Enables viewing of .svg files

5.1.1 Automatic code formatting

Let’s try the Air extension: find it in the Extensions marketplace and install it. Then, type some deliberately messy code into explore.R:

x=c(1,2,   3,4)
y   <-1:10

Open the Command Palette and run Format Document.

Let’s try it with one other example — add this to plots.R:

ggplot(flights, aes(x = arr_delay)) + geom_histogram(bins = 100, fill = "steelblue", color = "grey20") +
  scale_y_continuous(expand = expansion(mult = c(0, 0.05)), labels = scales::comma_format())
TipWant to always format code when you save a file?

Look for editor.formatOnSave further down on this page.

5.2 Settings: the UI and the JSON file

The main way to change Positron’s settings is the Settings UI: open the Command Palette and run Preferences: Open Settings (UI). We’ll explore some Editor-related settings next.

Under the hood, every setting lives in a settings.json file, which you can edit directly via Preferences: Open User Settings (JSON).

This can be useful because, for example, it lets you paste in a whole block of settings someone shared with you, and makes it easy to copy your entire configuration to a new computer. Occasionally, it’s also the only way to reach a setting that isn’t yet exposed in the UI.


Settings come in two levels:

  • User settings apply everywhere, across every folder you open — these are your personal preferences, like a theme or keybindings.
  • Workspace settings apply only to the current folder, and get saved in a .vscode/settings.json file inside it.

Workspace settings override user settings when the two conflict. Unless you have a specific reason to limit a setting to one project, change user settings by default, so your preferences carry over to every new folder you open.

5.3 Editor features and settings

5.3.1 Side-by-side editors

Drag a tab to the left or right edge of the Editor area (or use View: Split Editor from the Command Palette) to view two files at once, side by side. This is useful for comparing two scripts, or keeping a script and a data file’s Data Explorer view open together.

Screenshot of the Positron IDE, showing two editor tabs side by side

5.3.2 Preview mode

By default, clicking a file opens it in preview mode: the tab title shows in italics, and opening a different file this way reuses that same tab instead of opening a new one. This can be handy to prevent your tab bar from filling up with files you only glance at, but takes some getting used to.

Once you start editing a file, the tab becomes permanent and is no longer in preview mode. But sometimes you want to keep a file open even if you haven’t edited it yet. You can do this in two ways:

  • Double-click the file to open it in a permanent tab to begin with, or
  • For a file in preview mode, with your cursor in the file, use the Cmd/Ctrl+K P shortcut to make it permanent.

If you really don’t like preview mode, you can turn it off entirely with the setting workbench.editor.enablePreview: false.

5.3.3 A few more settings and features

  • files.autoSave — saves files automatically; some people love this, others hate it, try it and see.

  • editor.rulers: [80] — draws a thin vertical guide line at column 80, helping you keep lines from getting too long (a common style convention in R). Off by default; add more numbers to the list for multiple guides.

  • editor.formatOnSave — automatically formats code when you save a file, if you have a formatter installed (we do — we installed Air above).

WarningWatch out: copying with nothing selected

If you press Cmd/Ctrl+C with no text selected, Positron (like VS Code) copies the entire current line instead of doing nothing. This is quite handy but can also catch you off guard. Try it: click somewhere in a line of your script without selecting anything, press Cmd/Ctrl+C, and then paste on an empty line below.

If you don’t want this behavior, you can turn it off with:

"editor.emptySelectionClipboard": false
TipWant more space for your editor and panes?

If you want to maximize the horizontal space for your editor and panes, you can move the Activity Bar from the left side to the top of the window, next to the menu bar, with the setting workbench.activityBar.location: "top". Try it!

Multiple cursors work much as in RStudio (Alt+click, Ctrl+Alt+arrow keys), but Positron adds a handy way to build a multi-cursor selection from matching text:

  • Cmd/Ctrl+D adds the next occurrence of whatever you have selected — press it repeatedly to build up the selection one match at a time.
  • Cmd/Ctrl+Shift+L selects all occurrences in the file at once.
  • Esc returns you to a single cursor.

This is a quick way to rename a variable or column throughout a script, without a find-and-replace.

5.4 Keyboard shortcuts (keybindings)

Open the Command Palette and run Preferences: Open Keyboard Shortcuts to see every action (command) you can perform in Positron, and their current shortcut (if it has one) in a searchable list — type a command name or describe the action you want (e.g. run line) to find it.

You can click any row to record a new shortcut, and right-click to reset it back to default.

Many RStudio shortcuts already work in Positron, but others don’t, because Positron inherits VS Code’s shortcuts, which sometimes conflict. But if you’re really used to the RStudio keybindings, and want to keep using those, you can essentially restore them.

Open the Command Palette and run Preferences: Open Settings (UI), then search for rstudioKeybindings and check the box:

"workbench.keybindings.rstudioKeybindings": true

Restart Positron for it to take effect. This turns on a large set of RStudio shortcuts, including:

Shortcut Action
Ctrl+1 Focus the Source/Editor pane
Ctrl+2 Focus the Console
F2 Go to definition

Exercise: Customize Positron

Spend a few minutes setting Positron up the way you like it. For example:

  1. Turn on RStudio keybindings.

  2. Change some settings from the list above or find your own by browsing the Settings UI.

  3. Install an extension that looks useful to you.


Bonus exercise: Open one of your own projects

  1. Use File > Open Folder... to open a folder that corresponds to one of your own projects with R scripts and data files.

  2. Open a script you know well, and run the first few lines of it.

  3. Open one of your own data objects in the Data Explorer.

Does anything stand out?


NoteFurther resources
Back to top

Footnotes

  1. Or if that’s somehow not showing, by using the menu File > Open Folder....↩︎

  2. For example, a table copied from a webpage directly into R, Python, Julia, SQL, or Markdown code.↩︎