possible to create latex multicolumns in xtable?
问题 I am using xtable with R Markdown and knitr to produce .tex files that I call with \input{}. Works great, but I have not figured out how to create multicolumns like the one shown here. Does anyone know how to to this? So far I am using: tbl <- xtable(data, align="l r r r r r") colnames(tbl) <- c("Variable", "Mean", "Std Dev", "Mean", "Std Dev", "Difference") caption(tbl) <- c("Table Title") print(tbl, include.rownames=FALSE, caption.placement="top", booktabs=TRUE, type="latex", file="output