title: R Error: Shadow graphics device error
body: <p>yes I know there are many threads to this above mentioned error, but (at least I) wasn't able to find a solution.
  So RStudio gives me the following error while trying to plot something:</p>
  
  <blockquote>
  <pre><code>    Error in RStudioGD() : 
      Shadow graphics device error: r error 4 (R code execution error)
  </code></pre>
  </blockquote>
  
  <p>It seems to be a problem with R supporting jpeg and png.
  Running in R environment</p>
  
  <pre><code>    &gt;capabilities()
      jpeg         png        tiff       tcltk         X11        aqua 
      FALSE       FALSE       FALSE       FALSE       FALSE       FALSE
      http/ftp     sockets      libxml        fifo      cledit       iconv 
      TRUE        TRUE        TRUE        TRUE       FALSE        TRUE 
      NLS     profmem       cairo         ICU long.double     libcurl 
      TRUE       FALSE       FALSE        TRUE        TRUE        TRUE 
  </code></pre>
  
  <p>shows exactly that. cairo and pango are installed. And I have no idea what else to do.
  <a href="https://github.com/clauswilke/dataviz/blob/master/visualizing_uncertainty.Rmd" rel="nofollow noreferrer">Here</a> you can find the code I'm trying to run. I installed the packages magrittr, ggplot2, dplyr, cowplot and patchwork.
    Furthermore I'm running the latest RStudio version on linux. R itself is also updated.</p>
  
  <p>Thanks in advance.</p>
  
  <hr>
  
  <p><strong>EDIT</strong>:
  <em>For anyone stumbling over the same problem: A complete re-installation of R, RStudio and most depencies solved the problem somehow.</em></p>