vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Formula command only gives error in vscode-R

Open arbreazeale opened this issue 1 year ago • 0 comments

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

arbreazeale avatar Oct 01 '24 03:10 arbreazeale