I'd like to have $\alpha_1$ in my table, and the column name is $\beta_0$
####
library(xtable)
mytable <- data.frame(beta_0 = c("aa","bb","cc$\\alpha_1$"))
colnames(mytable) <- "$\\beta_0$"
print(xtable(mytable), include.rownames = F, sanitize.colnames.function =
identity)
####
No problem with \beta_0, but a problem with \alpha_1:
\begin{table}[ht]
\centering
\begin{tabular}{l}
\hline
$\beta_0$ \\
\hline
aa \\
bb \\
cc\$$\backslash$alpha\_1\$ \\
\hline
\end{tabular}
\end{table}
How may I fix the $\alpha_1$? Thanks!
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.