Reputation: 6798
I installed extension for R language https://marketplace.visualstudio.com/items?itemName=Ikuyadeu.r
When i run my R code in visual studio code with (ctrl + enter) i get empty window instead of graph image.
but in visual studio 2017 it works
Upvotes: 25
Views: 40471
Reputation: 4592
Now it is possible.
Step 1:
a) Install httpgd
from CRAN or github. From CRAN,
From CRAN:
install.packages("httpgd")
From GitHub:
devtools::install_github("nx10/httpgd")
b) Install languageserver
:
install.packages("languageserver")
Step 2:
Install R extension for vscode
Step 3:
From vscode setting, select R > Plot: Use httpgd
to use for R plot.
They have done a amazing job with R extension. We can view data.frame and list in a separate data viewer in vscode.
Upvotes: 18
Reputation: 580
It looks like its opening an external graphics window. Try putting
windows();plot(stuff)
This explicitly pushes the plot to an external window
Upvotes: 8