title: Rmarkdown with no X11
body: <p>I'm trying to run an <code>Rmarkdown</code> script (<code>myRmdScript.Rmd</code>) on a <code>linux</code> machine with no <code>X11</code> enabled and crashing with:</p>
  
  <pre><code>Quitting from lines 2-7 (myRmdScript.Rmd)
  Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width,  :
    unable to start device PNG
  Calls: &lt;Anonymous&gt; ... block_exec -&gt; chunk_device -&gt; dev_new -&gt; do.call -&gt; &lt;Anonymous&gt;
  In addition: Warning messages:
  1: In grDevices::png(f) : unable to open connection to X11 display ''
  2: In (function (filename = "Rplot%03d.png", width = 480, height = 480,  :
    unable to open connection to X11 display ''
  
  Execution halted
  </code></pre>
  
  <p>This is my first code chunk:</p>
  
  <pre><code>```{r setup, include=FALSE}
  library(Cairo)
  knitr::opts_chunk$set(dev="CairoPNG")
  knitr::opts_chunk$set(echo=TRUE,out.width='2000px',dpi=200)
  ```
  </code></pre>
  
  <p>Is there anyway to solve this other than enabling <code>X11</code> on this machine (which is unfavorable to RAM consumption issues)?</p>