REditorSupport / REditorSupport/vscode-R
Formula command only gives error in vscode-R
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
Describe the bug
When using Formula() in vscode-R (but not when running R/radian directly or RStudio), attempts to set any formula gives "the condition has length > 1" which repeats until crash (even when using non-Formula commands like y <- 1).
To Reproduce
- Launch an R session from VSCode (not using a terminal command, but within the app). I've done this by (a) running a chunk from within an .Rmd file and (b) Terminal > + (dropdown) > R Terminal.
- Enter the following code:
library("Formula")
f <- y ~ x
F <- Formula(f)
- See error "the condition has length > 1"
Can you fix this issue by yourself? (We appreciate the help)
No (I wish I could, but that's outside the realm of my knowledge)
Expected behavior
The command should run without issue and create the F object in the environment.
Environment (please complete the following information):
I've tried this on two machines:
Machine 1
- OS: Fedora 40 (Budgie Spin)
- VSCode Version: 1.93.1
- R Version: 4.4.1
- vscode-R version: 2.8.4
Machine 2
- OS: Windows 10 Enterprise
- VSCode Version: 1.74.2
- R Version: 4.2.1
- vscode-R version: 2.8.3
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
Reproduce the issue in a VSCode R session by running the example from an .Rmd chunk or Terminal > R Terminal. Compare it with direct R or radian and RStudio, then trace how vscode-R handles Formula(f) and subsequent input. Done means Formula(f) creates F without repeated errors or a crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100