When I was using Jupyter Notebook in VS Code to run R code, there is always a warning popping out, which says "no text editor active. Source: R". I do not know what it means, but everything seems to work fine for me. Does anyone know what I need to do to fix this warning?
Also, FYI, this warning does not pop up when I write R script. It only shows up when I was using Jupyter Notebook.
I tried to re-install the R extension in VS Code. But it still shows up frequently.
2
Answers
On the status bar (the bar at the bottom of the screen), there should be a cell that says "R: (not attached)." If you click on this, it will attach an R terminal to the notebook, and the warning should not pop up anymore.
Disable R extension and restart VS Code. The warning will disappear.
If you just run R code in Jupyter notebooks within VS Code, the R extension for VS Code (reditorsupport.r) is not strictly necessary. However, it does provide additional features and conveniences, specifically for working with R scripts and R Markdown files directly in VS Code.