Since upgrading to R 4.1.0 I get the following problem when trying to plot using either base or ggplot graphics in RStudio 1.4.1106.
dta <- data.frame(x = 1:5, y = 1:5)
> plot(dta$x, dta$y)
Error in (function (filename = "Rplot%03d.png", width = 480, height = 480, :
Graphics API version mismatch
Error in RStudioGD() :
Shadow graphics device error: r error 4 (R code execution error)
It works fine in Rgui. I've tried uninstalling and reinstalling RStudio, but it has no effect.
Any ideas how to fix this?
Thanks,
David