posit-dev / posit-dev/positron

Support `edit()` similar to RStudio

Open
#8,396 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement lang: r support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

System details:

Positron and OS details:

version: Positron Version: 2025.06.0 (system setup) build 167
Code - OSS Version: 1.100.0
Commit: e7e5d5590adc6bf7b760f837051cd2f57ea9e3dc
Date: 2025-05-29T21:27:54.586Z
Commit: 34.5.1
Date: 132.0.6834.210
Electron: 20.19.0
ElectronBuildId: 13.2.152.41-electron.0
Chromium: Windows_NT x64 10.0.19045

Describe the issue:

R 4.2.3 Seurat 5.1.0

When I try to modify Seurat's internal functions using edit.

DoHeatmap1 <- edit(Seurat::DoHeatmap())
Error in DefaultAssay():
! argument "object" is missing, with no default
Hide Traceback

  1. ├─utils::edit(Seurat::DoHeatmap())
  2. └─Seurat::DoHeatmap()
  3. ├─assay %||% DefaultAssay(object = object)
  4. └─SeuratObject::DefaultAssay(object = object)

Even if I directly copy the DoHeatmap function content and reassign it to DoHeatmap1, it still doesn't work like in RStudio and throws an error.

Error in Melt():
! could not find function "Melt"
Hide Traceback

  1. └─global DoHeatmap1(...)
  2. └─global SingleRasterMap1(...)

Expected or desired behavior:

Please provide F2 and edit functionality similar to RStudio, or if it already exists, please let me know where to find it.

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.

Research direction

Start by reproducing the reported workflow with R 4.2.3 and the Seurat DoHeatmap example, then inspect Positron's existing F2 and edit command entry points. Compare the behavior with RStudio, including editing a function definition and reassigning it, and define done as documented or working edit functionality that handles the reported cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
desktop-dev, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.