I am having trouble getting my graphs to appear in the 'plots' window of R studio - once I run the script they appear in a separate R graphics window, separate to R Studio, with the 'plots' tab blank.
Is there a setting or code I should use to change this?
Thank you in advance,
Go to Tools->Global Options->Rmarkdown. In "Show output preview in" select "Viewer Pane" Uncheck the box "Show output inline for all R Markdown documents"
Please suggest. Menu “View” > “Show Plots”.
dev. off shuts down the specified (by default the current) device. If the current device is shut down and any other devices are open, the next open device is made current.
This has been a consistent problem for many users ever since the last couple updates, myself included. It was apparently fixed with 3.5 version of R, which I haven't updated to, but you didn't mention which version you are running.
Either way, if you're running the most updated version or not, try getOption("device")
and check the output of that. Per an R support community post, if the output does not say RStudioGD
, you can use options(device = "RStudioGD")
.
The NEXT, and more annoying, solution was to uninstall and reinstall RStudio. Many people found that this solved their problem.
If neither of those work work, the only other solution that people were finding is to downgrade your R version to a compatible version unfortunately! It's really annoying, I know!
Hope I could help!
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