title: Add an image to a table-like output in R
body: <p>I have a simple data structure: cases are countries and for each country I have a couple of numeric variables. Like so:</p>
  
  <pre><code>dat &lt;- data.frame(country = c("Belgium", "Germany", "Holland", "Ireland"), Var1 = 1:4, Var2 = 11:14)
  print(dat, row.names = FALSE)
  
   country Var1 Var2
   Belgium    1   11
   Germany    2   12
   Holland    3   13
   Ireland    4   14
  </code></pre>
  
  <p>The table needs to be formatted still, with headings in bold, and rows colored in grey or white, alternatingly.</p>
  
  <p>Now, what I want is to add two additional columns, in between "country" and "Var1". The first new column is called "flag" and should contain the country's flag. The second new column is called "flagged" and contains an image of a red flag is the country scores very bad on a particular human rights issue, an orange flag if it scores mediocre and nothing elsewise.</p>
  
  <p>How can I create an object that prints that way in R? How to combine images with data in such a layout?</p>
  
  <p>(eventually this will part of a larger document created with <code>knitr</code>)</p>