title: R knitr print in a loop
body: <p>I've been using the <code>xtable</code> package to create HTML tables out of R matrices. When I used the function <code>kable</code> in a loop, it didn't output anything. So I stared using the <code>print</code> function, which worked. The problem is that when I use the print function I get lots of "##" printed along the table HTML. Is there a way to print my kable but avoiding the "##" per line while in a loop?</p>
  
  <pre><code>library("xtable", lib.loc="~/R/win-library/3.1")
  
  for(i in 1:3) {
      #Must use print because of the loop, but get ## per line
      print(kable(head(cars), "html", table.attr='class="flat-table"'))
  }
  #No neded to use print, no ## printed per line
  kable(head(cars), "html", table.attr='class="flat-table"')
  </code></pre>