]> git.donarmstrong.com Git - xtable.git/blob - pkg/tests/test.xtable.data.frame.R
Response to feature request #2104 asking for \centering rather than center environmen...
[xtable.git] / pkg / tests / test.xtable.data.frame.R
1 ### Test code for logicals bug (number 1911)
2 ### David Scott, <d.scott@auckland.ac.nz>, 2012-08-10
3 ### Example of problem with logical
4 library(xtable)
5 mydf <- data.frame(x = c(1,2), y = c(TRUE,FALSE))
6 xtable(mydf)
7
8 ### Output should be
9 ## % latex table generated in R 2.15.0 by xtable 1.7-0 package
10 ## % Fri Aug 10 23:16:30 2012
11 ## \begin{table}[ht]
12 ## \begin{center}
13 ## \begin{tabular}{rrl}
14 ##   \hline
15 ##  & x & y \\
16 ##   \hline
17 ## 1 & 1.00 & TRUE \\
18 ##   2 & 2.00 & FALSE \\
19 ##    \hline
20 ## \end{tabular}
21 ## \end{center}
22 ## \end{table}
23