0

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*}
```
  • 1
    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
  • 1
    done. Glad it solved your issue. – scottkosty Jan 15 '16 at 16:33
1

You can do this with the floating.environment option while reading the following documentation:

library(xtable)
?print.xtable

For example:

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.