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

后端 未结 8 1563
渐次进展
渐次进展 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:05

    I had the following error in a CentOS:7 Docker container when running rstudio-server verify-installation:

    27 Feb 2017 14:17:09 [rsession-rstudio-server] ERROR r error 4 (R code execution error) [errormsg=Error in system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE) :
      error in running command
    ]; OCCURRED AT: rstudio::core::Error rstudio::r::exec::<unnamed>::evaluateExpressionsUnsafe(SEXPREC*, SEXPREC*, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::<unnamed>::EvalType) /root/rstudio/src/cpp/r/RExec.cpp:159; LOGGED FROM: rstudio::core::FilePath rstudio::session::module_context::findProgram(const std::string&) /root/rstudio/src/cpp/session/SessionModuleContext.cpp:879
    27 Feb 2017 14:17:09 [rsession-rstudio-server] ERROR r error 4 (R code execution error) [errormsg=Error in system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE) :
      error in running command
    ]; OCCURRED AT: rstudio::core::Error rstudio::r::exec::<unnamed>::evaluateExpressionsUnsafe(SEXPREC*, SEXPREC*, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::<unnamed>::EvalType) /root/rstudio/src/cpp/r/RExec.cpp:159; LOGGED FROM: rstudio::core::FilePath rstudio::session::module_context::findProgram(const std::string&) /root/rstudio/src/cpp/session/SessionModuleContext.cpp:879
    

    I fixed it by installing which command: yum install which

    0 讨论(0)
  • 2021-01-08 01:10

    Under Ubuntu 13.10 I had the similar issue with rstudio server, tried all different suggestions no work. Finally figured out this way:

    1. sudo service rstudio-server stop
    2. remove all rstudio related files (sudo find / -name "rstudio" | xargs sudo rm -r)
    3. uninstall R: sudo apt-get remove r-base-core r-base r-base-dev
    4. remove all R related files (sudo find / -name "R" | xargs sudo rm -r)
    5. re-install R: sudo apt-get install r-base-core r-base r-base-dev
    6. test R: making sure plot(cars) works in R, output a pdf file.
    7. re-install R studio server: http://www.rstudio.com/ide/download/server
    0 讨论(0)
提交回复
热议问题