title: How to save a graphic in R instead of visualizing it?
body: <p>I a bit of code that produces a matrix. I then generate a heatmap from this matrix using the function:</p>
  
  <pre><code>heatmap(d)
  </code></pre>
  
  <p>However, I would like to be able to save this img directly and bypass displaying the graphic, so that I can incorporate this function into a unix-based workflow.</p>
  
  <p>Can someone please show me the snippet of code required to save this image without displaying it on screen? Thanks!</p>