This has been a constant problem for many users since the last couple updates, including myself. Apparently this was fixed in version 3.5 of R, which I did not update, but you did not mention which version you are using.
In any case, if you use the getOption("device") version itself or not, try getOption("device") and check the output of this. According to the R support community, if the output does not specify RStudioGD , you can use options(device = "RStudioGD") .
The NEXT, and even more annoying, solution was to uninstall and reinstall RStudio. Many people found that this solved their problem.
If none of these works, the only other solution people have found is, unfortunately, to switch your version of R to a compatible one! This is really annoying, I know!
I hope I can help!
source share