Sometimes, when pressing Ctrl+Enter in VScode (Windows) to run a line of R code in the editor, it sends the code in the R terminal window and inserts a ")" at the end of the code and doesn't execute it.
I installed VScode as per the online instructions. Most of the time I don't get that issue but sometimes I do (I beleive mostly when running a function with curly brackets {} ).
I inserted a screenshot for reference.

I looked through the github issues for vscode-R. This is a Windows specific issue. There's a thread on this and the solution is not obvious/does not exist yet: https://github.com/REditorSupport/vscode-R/issues/820
Leaving the post here in case it might help people in the future
I use WINDOWS. This solution seems to work:
Create a file called .radian_profile in the working directory. You can check your working directory by running getwd() in radian when it starts up.
In the .radian_profile file you created, paste this line:
options(radian.auto_match = FALSE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With