I'm producing a series of tables in R that will include fractions once I report them in latex. To do this, I'm using the paste() function to apply the fraction command in r, however when I xtable it, it loses the "\f" in the beginning. Below is code. Do you know how to preserve the full function? Thanks
x <- as.vector(rbind(1, paste("\frac{",1, "}{", 2, "}", sep ="" )))
y <- as.vector(rbind(2, paste("\frac{", 2, "}{", 3, "}", sep ="" )))
table<- cbind(x,y)
xtable(table)