I work with xtable which turns a table of r into a functionable latex code.
<<echo=false>>=
attach(warpbreaks)
p2 <- round(tapply(breaks, list(tension), mean), digits=2) %>%
as.table(.)
@
p2 looks like this:
L M H
36.39 26.39 21.67
But the output of the created pdf of this code:
<<echo=false, results=tex>>=
library("xtable")
xtable(p2,
align = "rr")
@
looks (approximately) like this:
x
L 36.39
M 26.39
H 21.67
Why does it not look like the inital table in r and how can I fix it?