RStudio 2022.12.0: What’s New

The v2022.12.0 release of RStudio, code-named “Elsbeth Geranium", brings significant improvements to the Python experience, accessibility, and more.
2023-03-07
Text on right: Product Release, RStudio 2022.12.0, What's New. Posit Workbench icon on the bottom. On the left, a screenshot of the Workbench IDE selector screen.

This post highlights some of the improvements in the latest RStudio IDE release 2022.12.0, code-named “Elsbeth Geranium.” To read all the new features and updates in this release, check out the latest Release Notes.

RStudio Desktop

Posit Workbench

 

New branding

 

We’ve renamed our professional products to Posit Connect, Posit Workbench, Posit Package Manager, Posit Cloud, and Posit Academy to match Posit Software, PBC’s new branding terminology, and iconography. Please review our blog post/FAQ to answer commonly asked questions about the rebrand.

 

Increased accessibility

 

We have spent over six months porting RStudio to Electron, with increased accessibility being a primary outcome. The new release adds improved support for screen readers and more. 

 

New User Guides

 

RStudio v2022.12.0 includes new documentation. In addition to the Posit Workbench Administrator Guide and RStudio Desktop Administrator Guide, each release of RStudio and Posit Workbench will now include two user guides. 

 

RStudio User Guide

 

The RStudio User Guide helps users understand the core workflows in RStudio. It provides information on:

  • Navigating the user interface and appearance
  • Managing R and R packages, working with Python
  • Authoring code or text editing, debugging, and diagnostics
  • Using the Visual Editor for Quarto and RMarkdown
  • Reading data from local and remote sources
  • Integrating with version control systems and the terminal

If you’re new to RStudio or teaching with RStudio, make sure to check out the Getting Started section! If you are instead looking to level up your skills, see the Productivity section. We guarantee you will learn some new tricks.

The user guide is a group effort, centralizing years’ worth of blog posts, support articles, and other peripheral materials. We made the Guide with Quarto, and the source code is on GitHub. We welcome issues, misspellings, corrections, or other contributions to the open-source documentation. Updates to the guide will correspond to releases of the IDE.

 

Posit Workbench User Guide

 

The Posit Workbench User Guide teaches users how to interact with Posit Workbench RStudio Pro, VS Code, JupyterLab, and Jupyter Notebook sessions. It outlines the user-facing features included when accessing these IDEs through Posit Workbench, such as Workbench Jobs, and details necessary configurations to successfully take advantage of each IDE’s full capabilities when run inside Posit Workbench.

For IDE behavior that is not specific to Workbench, we recommend that users reference the documentation provided by the creator of each IDE.

 

RStudio Desktop

 

Shiny for Python support

 

Shiny for Python apps now display a “Run App” button on the Source editor toolbar. This requires the shiny Python package v0.2.7 or later.

 

Posit Workbench

 

Posit Workbench is the place for teams to collaboratively build open-source data science projects at scale. It supports R and Python, giving data scientists access to all the development environments they love, including RStudio, Jupyter, and VS Code. Workbench provides enterprise-friendly features, such as centralized management, security, and commercial support.

 

Session launch screen layout

 

To make Workbench into a true language- and platform-agnostic system, we have modified the visuals of the New Session launch dialog. Now, it displays a list of installed editors in a graphic format rather than a dropdown so that we can present all of them visually in the same space.

 

The IDE selector screen on Workbench, showing Jupyter Notebook, Jupyter Lab, RStudio Pro, and VS Code with their respective icons.

 

The large icons make it easy for users to quickly select their desired editor. We have ordered them alphabetically to reduce bias towards any one language or editor rather than placing RStudio Pro at the head of the list.

 

Install VS Code by default

 

Posit Workbench now packages Code Server version 4.7.1, so administrators no longer need to install or upgrade Code Server separately from Posit Workbench. All non-upgraded installs of Workbench will come with VS Code Sessions pre-configured and enabled by default, allowing users to launch VS Code sessions without any custom admin work. Administrators should follow the process described in the VS Code Sessions General Installation section of the Administrator Guide to start using the packaged version of Code Server in upgraded configurations.

 

VS Code upgrades

 

Support for Code Server 4.7.1

 

2022.12.0 upgrades the supported version of Code Server from 4.4.0 to 4.7.1, which uses version 1.71.2 of Code

 

Workbench Jobs from VS Code

 

VS Code sessions running in Workbench now support Workbench Jobs! Workbench Jobs are asynchronous jobs that execute an R or Python script independently of your current session. Previously, Workbench Jobs could only be launched and managed from RStudio Pro sessions (see the new RStudio Pro User Guide for a refresher on how to do that in RStudio Pro).

Additionally, Workbench Jobs are synced across RStudio Pro and VS Code sessions so you can check the status of your jobs from your working session. 

Workbench Job functionality in VS Code is provided through the Workbench extension for VS Code. For details on how to get started, see the Workbench Jobs section in the new VS Code User Guide.

In addition to Workbench Job support in VS Code, Python scripts can now be used with Workbench Jobs launched from VS Code!

 

Python script launcher screen in VS Code

 

The new Python script functionality works similarly to R scripts to launch jobs in RStudio Pro. Once you select your script, the dialog will update to show, including the ability to select your desired Python interpreter for a given script. Currently, Python jobs can only be initiated from VS Code running in Workbench, but the status of any job can still be monitored from either VS Code or RStudio Pro sessions.

 

Flask and FastAPI upgrades

 

The Posit Workbench VS Code Extension has been updated to support proxying Flask and FastAPI applications in Posit Workbench VS Code sessions.

 

Flask

 

  • Typing `from flask import` within a Python file will now trigger the Posit Workbench Flask Interface code snippet so that users can quickly add the logic needed to tell Flask it is running behind a proxy, ensuring that Flask applications work as expected.

Triggering the Posit Workbench Flask Interface code snippet by typing `from flask import`

  • A Workbench Flask Hint help dialog has been added that will appear when the extension determines that the user is working on a Python file in which Flask has been imported without including the Posit Workbench Flask Interface code snippet. This hint dialog provides an option to copy the code snippet directly from the dialog, allowing users to quickly insert it where needed.

Workbench Flask Hint help dialog pop up

 

Users can control whether the Workbench Flask Hint is shown from the settings.

 

Workbench Flask Hint option checked off

 

FastAPI

 

A few features have been added to ensure that users can quickly and easily set FastAPI’s `root_path` variable, which is necessary when running FastAPI applications behind a proxy.

  • When running FastAPI with Uvicorn and the default port, no extra configuration is required! In this case, Workbench will set the necessary variables to allow FastAPI applications to function as expected.
  • When desiring to programmatically specify a port to run their application on, users can make use of the new Post Workbench FastAPI Uvicorn Root Path code snippet. This code snippet can be triggered by typing `from fastapi import FastAPI`. A default port of 8000 is provided, with the cursor focused on the port definition so users can immediately edit this value to their desired port.

Triggering a code snippet from `from fastapi import FastAPI`

  • If the extension detects that a python file contains the `uvicorn.run(…` command that sets a specific port value without including the `root_path` argument, the Workbench FastAPI Hint dialog is triggered. This help dialog informs the user of the required `root_path` variable and includes the necessary code, which they can copy directly to their clipboard using the ‘Copy code’ button. The copied snippet will include the custom port value and any additional arguments the user has passed to `uvicorn.run`.

Adding additional arguments to `uvicorn.run`

 

Users can control whether the Workbench FastAPI Hint is shown from the settings.

 

Workbench FastAPI Hint settings screen

  • If the extension detects that a port has been passed to Uvicorn without specifying the `root_path` argument, the server will appear in the Proxied Servers view with a warning.

Proxied Servers view warning

 

Learn more

 

There’s lots more in this release, and it’s available for download today. You can read about all the features and bug fixes in the RStudio 2022.12.0 “Elsbeth Geranium” release in the RStudio Release Notes. We’d love to hear your feedback about the new release on our community forum.