[R] turning off escape sequences for a string

Stephen J. Barr stephenjbarr at gmail.com
Tue Jun 16 18:12:23 CEST 2009


Hello,

I would like to create a matrix with one of the columns named
$\delta$. I have also created columns $\beta_1$ , $\beta_2$, etc.
However, it seems like \d is an escape sequence which gets
automatically removed. (Using these names such that they work right in
xtable -> latex)

colnames(simpleReg.mat) <- c("$\beta_1$","$SE(\beta_1)$", "$\beta_2$",
"$SE(\beta_2)$", "$\delta$", "$SE(\\delta)$")
Warning messages:
1: '\d' is an unrecognized escape in a character string
2: unrecognized escape removed from "$\delta$"

Is there a way to get R to not remove the unrecognized escape?

Thanks,
-stephen




More information about the R-help mailing list