I recently upgraded to Linux mmint 19 and reinstalled R and Rstudio on my
computer. I keep getting this error when I try to plot something. The plot
function works fine in R.
Error in RStudioGD() : Shadow graphics device error: r error 4 (R code execution error) In addition: There were 50 or more warnings (use warnings() to see the first 50) 50: In grDevices:::png("/tmp/RtmpOOKAJm/c23d93214a644f4b98ba6066e3bdb2e8.png", ... : failed to load cairo DLL
I check various forums, and I updated Cairo and Pango libraries and
reinstalled R and Rstudio but still get the error. Could someone help me
out with this problem? Thanks
Here are the outputs to SessionInfo
> sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Linux Mint 19 Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 LAPACK: /usr/local/lib/R/lib/libRlapack.so locale:  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8  LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C  LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages:  stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached):  compiler_3.5.1 tools_3.5.1 > > options('device') $device  "RStudioGD"
Thanks in advance for any advice,