I used the xtable package to create HTML tables from R-matrices. When I used the kable function in a loop, it did not output anything. So I looked with the print function, which worked. The problem is that when I use the print function, I get a lot of "##" printed along the HTML table. Is there a way to print my kable, but avoiding "##" per line in a loop?
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"')
loops r knitr
Flavia amaral
source share