1

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

yuliaUU
  • 1,581
  • 2
  • 12
  • 33

1 Answers1

0

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

Community
  • 1
  • 1
Techidiot
  • 1,921
  • 1
  • 15
  • 28