REditorSupport / REditorSupport/vscode-R

Radian "works" but won't run my code properly

Open
#1,090 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug stale
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

When I try to run my code in VS Code via the run button OR ctrl + shift + enter, the radian terminal gives me the following message:

source("c:\\Users\\username\\myfilepath\\...\\file.r", encoding = "UTF-8")
")

If I try several times in a row, it prints out the same thing, but adds more closing parentheses at the end.

On the other hand, if I try to run my code via ctrl + enter (without shift), radian runs only the last line of the code. It doesn't read or recognize anything prior to the last line of my file. For example, I will get an "object not found" error if I create an object on the first line and try to print it on the second. Only if I first highlight all the code and then press ctrl + enter will it print ou the entire selection and the proper result in the radan console.

Here are my JSON settings:

"r.bracketedPaste": true,  
"r.alwaysUseActiveTerminal": true,
"r.rterm.windows": "C:\\Users\\berut\\pyver\\py395\\Scripts\\radian.exe",
"r.plot.useHttpgd": true,
"r.rpath.windows": "C:\\Program Files\\R\\R-4.2.0\\bin\\R.exe",
"r.rterm.option": []

At a complete loss what I'm doing wrong, even after scouring reddit and stackoverflow and youtube...

I'm using the latest versions of VSCode, R, the R extension and R Debugger extension on Windows 11 (not WSL).

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 on Windows 11 using the reported VS Code settings, including r.rterm.windows and r.bracketedPaste. Compare the run button and Ctrl+Shift+Enter with Ctrl+Enter, then inspect the R extension's execution path and radian integration. Done means code runs as expected without accumulating closing parentheses and Ctrl+Enter handles the intended code scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.