I want to use xtable to display a simple data frame containing two vectors with logical values:
ia = c(TRUE, TRUE, FALSE)
ib = c(FALSE, TRUE, TRUE)
i.df = data.frame(ia, ib)
xtable(i.df)
This produces:
\begin{table}[ht]
\begin{center}
\begin{tabular}{rll}
\hline
& ia & ib \\
\hline
1 & c(TRUE, TRUE, FALSE) & c(FALSE, TRUE, TRUE) \\
2 & c(FALSE, TRUE, TRUE) & c(TRUE, TRUE, FALSE) \\
3 & c(TRUE, TRUE, FALSE) & c(FALSE, TRUE, TRUE) \\
\hline
\end{tabular}
\end{center}
\end{table}
However, I would have expected:
\begin{table}[ht]
\begin{center}
\begin{tabular}{rll}
\hline
& ia & ib \\
\hline
1 & TRUE & FALSE \\
2 & TRUE & TRUE \\
3 & FALSE & FALSE \\
\hline
\end{tabular}
\end{center}
\end{table}
For some reason xtable prints the full logical vectors in each line, instead of printing only one element per line. Does this make sense to anybody or am I overlooking something blatantly obvious?