Sweave xtable: how to position tables between text? Sweave xtable: how to position tables between text? r r

Sweave xtable: how to position tables between text?


The latex float package provides the float specifier H, which allows you to force tables and figures to be precisely in the location they occur in the latex code. For example:

\usepackage{float} ...<<echo=FALSE, results=tex>>=print(xtable(x),table.placement="H")@


See here for the table placement. You could try "!h" to force the table to stay where you wan't.


I find \clearpage after a float is sometimes useful.