Provide R language server support to allow a polyglot notebook

Open
#9,600 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
jupyter-notebook, python, r

Research direction

Start by reproducing the rpy2 Python-kernel workflow in a Positron notebook and compare it with the existing Reticulate-kernel approach mentioned in the issue. Determine the integration points needed for R-cell completion, linting, and formatting; done should include those language-server features working for R code executed through the notebook.

Written by the indexing model from the issue text.

Description

area: notebooks-jupyter enhancement notebooks-roadmap

System details:

Positron and OS details:

Positron Version: 2025.10.0 (system setup) build 131
Code - OSS Version: 1.103.0
Commit: d9f3047f74ac2d01186b19efdbf9afaa6f115316
Date: 2025-09-25T07:33:32.940Z
Electron: 37.2.3
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Windows_NT x64 10.0.26220

Session details:

R 4.4.3 and Python 3.12.10
rpy2 3.6.3

Describe the issue:

I just recently found that using rpy2 package, similar to reticulate, we can run R code in a Python kernel

Image

Steps to reproduce the issue:

  1. Install rpy2 package: pip install rpy2
  2. Provide path to R installation (optional, as I see some tutorials don't require it)
import os
os.environ['R_HOME'] = 'C:/Program Files/R/R-4.4.2'
%load_ext rpy2.ipython
  1. Write some R code in a cell by starting the cell with %%R
%%R
library(tidyverse)

data(mpg)
glimpse(mpg)
ggplot(mpg, aes(x=displ, y=hwy, color=fl)) +
  geom_point() +
  theme_minimal() +
  labs(title="Engine Displacement vs. Highway MPG",
       x="Engine Displacement (L)",
       y="Highway Miles per Gallon") +
  theme(legend.position="bottom")

Expected or desired behavior:

The code ran successfully. There is also syntax highlighting for code, but there is no code completion, linting, format, etc.

P/S: How should we leverage the Python Reticulate kernel to ease the process, given that there is still very little usage case of Reticulate kernel

Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/positron

All issues in posit-dev/positron

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.