I asked a question a while back about how to wrap long table cell content in an RMarkdown document. A nice answer pointed to the pander()
package.
I'm facing a similar issue again, only I'm working in an Rnw
file, and my understanding is that pander()
does not work with LaTeX. So I'm back to trying to figure out how to wrap long lines in kable()
.
\documentclass{article}
\begin{document}
This is my test
<<test, echo=FALSE>>=
library(knitr)
test <- data.frame(v1=c("This is a long string. This is a long string. This is a long string. This is a long string. This is a long string.",
"This is a another long string. This is a another long string. This is a another long string. This is a another long string. This is a another long string."),
v2=c(1, 2))
kable(test)
@
\end{document}