Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No plot viewer shown in vscode #1297

Closed
DrAnnaSchwartz opened this issue Feb 5, 2023 · 5 comments
Closed

No plot viewer shown in vscode #1297

DrAnnaSchwartz opened this issue Feb 5, 2023 · 5 comments

Comments

@DrAnnaSchwartz
Copy link

DrAnnaSchwartz commented Feb 5, 2023

httpgd package was installed, and r.plot.useHttpgd is set to true. However running a simple plot command, plot(rnorm(100)) as an example, only outputs a Rplots.pdf file. I was expecting a plot viewer panel in the vscode, like in Rstudio. Is this a bug or I missed something?
I have R4.2.2 installed and Radian, languageserver, vscDebugger all installed, along with R extension and R Debugger extension. Googling all day long, but no solution found on this. Thanks.

@renkun-ken
Copy link
Member

Do you use R: Create R terminal to start a new R session?

Would you like to post the value of ls.str(.vsc) and getOption("device") from your R terminal?

@DrAnnaSchwartz
Copy link
Author

DrAnnaSchwartz commented Feb 6, 2023

Thanks so much for responding! I just ran ls.str(.vsc) and getOption("device") in R terminal in R Studio and got the following:

image

So, ls.str(.vsc) returns error. I verified vscDebugger 0.5.2 (the latest release) is installed.
Not sure if this matters, but I have radian as the default terminal.

Then I tried to attach R session by clicking on the bottom "R: (not attached)", it also failed
image

So, i could not use "R: Create R terminal" to start a new R session in vs code.

@eitsupi
Copy link
Contributor

eitsupi commented Feb 6, 2023

@EngineeringScholar Have you checked the wiki?
https://github.com/REditorSupport/vscode-R/wiki/Interacting-with-R-terminals

@DrAnnaSchwartz
Copy link
Author

DrAnnaSchwartz commented Feb 6, 2023

I read the wiki. It seems the problem is that my vs code could not find R client.

I have R installed in C: for all user with the following paths set in windows:
image,
but Radian installed to Users AppData/Roaming/Python/Python311/Scripts/radian folder, which there was not a way I know of to change the installation path.
I wonder if this has something to do with the problem. Thanks!

@DrAnnaSchwartz
Copy link
Author

DrAnnaSchwartz commented Feb 6, 2023

Update: I disabled radian in Json settings, and it worked!! not sure why radian is causing the problem though. Thank you so much for your good work and help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants