I want to have column names on each page of the xtable.
\documentclass{article}
\usepackage{graphicx}
\usepackage{longtable}
\begin{document}
<<>>=
x <- matrix(rnorm(1000), ncol = 10)
x.big <- xtable(x,label='tabbig',caption='Example of longtable spanning several pages')
@
<<label = tabSEM.S, echo = FALSE, results = tex >>=
print(x.big,tabular.environment='longtable',floating=FALSE)
@
\end{document}
Any help will be highly appreciated. Thanks
I think this is really a LaTeX question, which I simply Googled and ended up with a simple answer from tex.stackexchange.com here.
Try this (untested in LaTeX; will be curious if this compiles the way you want):
print(x.big,tabular.environment='longtable',
floating=FALSE,
hline.after = c(-1,nrow(x.big)),
add.to.row = list(pos = list(0),command = "\\hline \\endhead "))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With