Error in RStudioGD() : Shadow graphics device error: r error 4 (R code execution error)

后端 未结 8 1661
渐次进展
渐次进展 2021-01-08 00:32

I am trying to plot using Rstudio. But when I do, plot(cars) which is the basic function, I am getting an Graphics Error in R.
Here is what I h

8条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-08 01:01

    I had the same issue and found James Mao's answer helpful, but I wanted to avoid reinstalling R so that I would not have to also reinstall all of my R packages. I was able to fix the issue by reinstalling RStudio without reinstalling R, which makes sense because the error is with RStudio, not R itself. Here are the instructions:

    1. sudo service rstudio-server stop
    2. remove all rstudio related files (sudo find / -name "rstudio" | xargs sudo rm -r)
    3. re-install R studio server: http://www.rstudio.com/ide/download/server

提交回复
热议问题