posit-dev / posit-dev/positron
Add code cells support for `knitr::spin()` syntax
Open
Nobody has claimed this yet.
area: code cells
enhancement
lang: r
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
We already have support for code cells in R with syntax like this (similar to the Python support):
# %%
1 + 1
# %%
library(tidyverse)
diamonds |>
filter(carat > 2) |>
group_by(color) |>
summarise(price = median(price))
Let's consider adding additional, alternative syntax support in .R files for using the knitr::spin() support, as outlined:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked Quarto and R Markdown references to understand the knitr::spin() syntax, then compare it with Positron's existing R and Python code-cell support. Add recognition for the alternative syntax in .R files while preserving the existing # %% form, and verify that both forms produce code cells as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100