title: how to save r dataframe as an image
body: <p>How can I create an image  from a data frame?  For example:</p>
  
  <pre><code>library(tidyverse)
  library(gridExtra)
   df = iris %&gt;% slice(1:4)
  </code></pre>
  
  <p>I've the following but:
  1.  I haven't been able to get this to be saved to a variable.  It just pops up in the plots pane of Rstudio.  Am I missing something obvious?  I'd like to be able to have this plot referenced to a variable so I could save it as a png or something.
  2. Is there a way to remove the row numbers that seem to appear?
  3. This look is fine, but is there a way to make it more of a lighter background compared to what this is?</p>
  
  <pre><code>gridExtra::grid.table(df)
  </code></pre>