I'm using xtable to compile tables from R automatically while compiling my TeX document. The question I have is how I get the variable names in the table (which in my case are the column names in a dataframe) to be in math mode. I have stored my results in the dataframe adf.results, and essentially what I want is
colnames(adf.results) <- c(" ", "$m^r_t$", "$\delta p_t$",
"$R^r_t$", "$R^b_t$", "$y^r_t$")
but that simply inserts $m^r_t$
... as the column names without interpreting them as being in math mode. Does anyone have a solution?