REditorSupport / REditorSupport/vscode-R

Formula command only gives error in vscode-R

Open
#1,568 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. 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.
  2. Enter the following code:
library("Formula")
f <- y ~ x
F <- Formula(f)
  1. 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.