[R] xtable - caption missing with float=FALSE

Zev Ross zev at zevross.com
Wed Aug 10 21:02:37 CEST 2011


Hi,

For some reason I'm finding that my table caption is disappearing if I 
print xtable output with the floating argument set to FALSE. Below is a 
very simple Sweave file that produces two tables the first has no 
caption and the second has a caption (if you want to see it 
http://www.zevross.com/temp/test.pdf).

Does anyone know what I can do to fix this?

Zev

(I'm using Windows 7, 64 bit, R 2.12.2)

% begin Rnw file

\documentclass[a4paper]{article}

\begin{document}

<<results=tex, echo=FALSE>>=
library(xtable)

atable<-data.frame(a=1:10, b=rnorm(10))
print(xtable(atable, caption="FLOAT"), floating=FALSE)
print(xtable(atable, caption="NO FLOAT"), floating=TRUE)
@

\end{document}


Sweave("test.Rnw")
texi2dvi("test.tex", pdf=TRUE, clean=TRUE)

-- 
Zev Ross
ZevRoss Spatial Analysis
120 N Aurora, Suite 3A
Ithaca, NY 14850
607-277-0004 (phone)
866-877-3690 (fax, toll-free)
zev at zevross.com



More information about the R-help mailing list