tests/test.xtable.data.frame.R

### Test code for logicals bug (number 1911)
### David Scott, <[email protected]>, 2012-08-10
### Example of problem with logical
library(xtable)
mydf <- data.frame(x = c(1,2), y = c(TRUE,FALSE))
xtable(mydf)

### Output should be
## % latex table generated in R 2.15.0 by xtable 1.7-0 package
## % Fri Aug 10 23:16:30 2012
## \begin{table}[ht]
## \begin{center}
## \begin{tabular}{rrl}
##   \hline
##  & x & y \\
##   \hline
## 1 & 1.00 & TRUE \\
##   2 & 2.00 & FALSE \\
##    \hline
## \end{tabular}
## \end{center}
## \end{table}

Try the xtable package in your browser

Any scripts or data that you put into this service are public.

xtable documentation built on Aug. 14, 2019, 3 p.m.