# xtable: extend table to both columns

Using the xtable package, is it possible to give some option to xtable function to generate a tex file which will contain following:


\begin{table*}
...
\end{table*}


• do you want something like print(xtable(data.frame(3)), floating.environment = "table*") ? If not, please give more details and a minimal example. – scottkosty Jan 15 '16 at 4:53
• Was struggling with this yesterday, and I was surprised now seeing your answer. Not believing such simple solution, I went through the xtable documentation again and realised "Possible values include "table", "table*", and other floating environments defined in LaTeX packages". Many thanks, this is exactly what I was looking for! – chao Jan 15 '16 at 11:01
• @scottkosty btw, could you please put this in the answer section just in case that somebody else need it. of course, I'll vote it up. thanks once more! – chao Jan 15 '16 at 11:55
• done. Glad it solved your issue. – scottkosty Jan 15 '16 at 16:33

You can do this with the floating.environment option while reading the following documentation:
library(xtable)

print(xtable(data.frame(3)), floating.environment = "table*")

Note that this is an option to print.xtable, not to xtable directly. Another option that is related is tabular.environment.