Vscode-r: commands not running

Created on 23 May 2018  路  16Comments  路  Source: Ikuyadeu/vscode-R

  • VSCode Version: 1.23.1
  • VSCode-R Version: v0.5.9
  • OS Version: Win10 x64 Enterprise build 15063

Basic problem: none of the commands are working. e.g. CTRL+ENTER from an R file gives
"command r.runSelection not found"

The same thing happens with other commands (e.g. r.lintr, r.previewEnvironment), and there's no option to create an integrated R terminal (although is of course accessible by entering 'R' into bash).

I searched around for an answer and came across this: Microsoft/vscode#44148
Maybe Excel Viewer is creating some problem? I can't disable or uninstall as vscode-R depends on it...

question

All 16 comments

@iainmstott Thank you for using this extension!
Please open directory that has R source files.
I put about it on https://github.com/Ikuyadeu/vscode-R#faq .

Oops, I'm sorry. I thought I had read everything but somehow I didn't notice that. Thanks for replying so quickly

Could you tell me that which file is R source file? I also meet the error "r.runselection not fund", and I changed different R location, it doesn't work

I don't understand. What's your meaning of "open directory that has R source files", open the file where I downloaded the R Gui?
I also meet this problem, thanks for your help.

I think what he mean is don't just open file1.R in vscode, but open the folder work in vscode and then edit file1.R.

work/
    data/
    file1.R
    file2.R

I think what he mean is don't just open file1.R in vscode, but open the folder work in vscode and then edit file1.R.

work/
    data/
    file1.R
    file2.R

Thank you so much! It does help me!

@iainmstott Thank you for using this extension!
Please open directory that has R source files.
I put about it on https://github.com/Ikuyadeu/vscode-R#faq .

Thank you!

I think what he mean is don't just open file1.R in vscode, but open the folder work in vscode and then edit file1.R.

work/
    data/
    file1.R
    file2.R

Thank you! This is crystal clear!

Due to a recent update (I guess of VScode, on Ubuntu), I now get the "command r.runSelection not found" error when opening a file on double-click and trying to send R code to the terminal, which previously worked fine. Opening the folder (File -> Open Folder...) like @Ikuyadeu kindly suggested does solve the problem. However, I wonder if there is a way to get the previous behavior, where runSelection worked without having to set up a folder... Thanks!

Screenshot from 2020-11-22 10-32-41

Looks like the extension activation is broken when workspace folder is undefined. Let me take a closer look on this.

Thank you very much! It would be really great to get back the old behavior

@michaeldorman Should be fixed via #456.

@renkun-ken Thank you very much! I don't know if there is a way to install the development version of the extension to test this, will be happy to do so if you can please let me know how. Otherwise will wait for the automatic (?) update of the extension.

@michaeldorman You could download the vsix built from that PR at https://github.com/Ikuyadeu/vscode-R/actions/runs/377123811 and install it in vscode.

I downloaded & installed using:

code --install-extension vscode-R.vsix

confirming that this solves the problem. There is no "command r.runSelection not found" error message anymore, commands can be sent to console without setting up a folder.

Thank you very much for the quick response and help!

@michaeldorman Good to know that it works for you. We should have checked more thoroughly somehow with the tests.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Victsz picture Victsz  路  5Comments

awellis picture awellis  路  5Comments

Nightwingg picture Nightwingg  路  6Comments

nathaneastwood picture nathaneastwood  路  6Comments

andycraig picture andycraig  路  4Comments