Starting recently, I noticed that the output from the knitr kable function is not being handled well. What appears to be happening is the HTML which is appended after the output follows too soon and bleeds into the table.
Manually added newlines after the kable call does not fix the issue.
It's possible that this is an issue for rmarkdown, but I cannot be certain and the kable output for normal html_document renderings looks okay.
In either case, the fix should be as simple as adding a newline somewhere in the output.
I tracked this but down and submitted a pull request to knitr, once it gets merged I will close this pull. Thank you for debugging the issue and the pull request, you made easy to figure out what was going on!
Hi Jim,
Starting recently, I noticed that the output from the knitr
kable
function is not being handled well. What appears to be happening is the HTML which is appended after the output follows too soon and bleeds into the table.Manually added newlines after the
kable
call does not fix the issue.It's possible that this is an issue for
rmarkdown
, but I cannot be certain and thekable
output for normalhtml_document
renderings looks okay.In either case, the fix should be as simple as adding a newline somewhere in the output.
To reproduce the issue, try:
test.rmd
library(rmarkdown) library(knitrBootstrap) render('test_kable.rmd', clean=FALSE)
... 6.3 2.5 5.0 1.9 virginica
6.5 3.0 5.2 2.0 virginica
6.2 3.4 5.4 2.3 virginica
5.9 3.0 5.1 1.8 virginica