我正在使用 sweave 创建 pdf。使用 xtable,我试图在表格下插入一般脚注(即:此符号表示 bla bla bla)。我尝试了很多方法,但都出现错误(或什么都不做)。这是我的代码:
<<echo=FALSE>>=
library(xtable)
resmat<-matrix(c("Income","inc1","inc2","inc3","inc4","inc5","inc6","inc7","inc8","inc9","inc10","OddsMale",paste(toString(l1[2]),"*"),paste(toString(l1[3]),"*"),paste(toString(l1[4]),"*"), l1[5],"base income",paste(toString(l1[6]),"^"),paste(toString(l1[7]),"*"),paste(toString(l1[8]),"*"),paste(toString(l1[9]),"*"),paste(toString(l1[10]),"*"),"OddsFemale",paste(toString(lf1[2]),"*"),paste(toString(lf1[3]),"*"),lf1[4], lf1[5],"base income",paste(toString(lf1[6]),"^"),paste(toString(lf1[7]),"^"),paste(toString(lf1[8]),"*"),paste(toString(lf1[9]),"*"),paste(toString(lf1[10]),"*")),11,3)
<<echo=FALSE,results=tex>>=
tab<-xtable(resmat,caption="Odds of Having Mental Health Given\\\\ Income per Gender, CCHS 2009-2012")
print(tab,include.rownames=FALSE,include.colnames=FALSE,hline.after = c(-1),caption.placement="top")
@
如果有人能帮助我!谢谢!