Reputation: 1723
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. when i use
dev.off()
it gives the error
*error in dev.off(): cannot shut down device 1 (the null device)*
Even if i ran this command twice the error still there. I tried restart Rstudio- did not work
Upvotes: 1
Views: 975
Reputation: 1947
You might try suppressing the output of dev.off()
Use-
temp <- dev.off()
Also refer similar thread
Suppressing "null device" output with R in batch mode
Upvotes: 0