I have successfully created a table, that I can run as follows:
library(xtable)
print(x, floating.environment='sidewaystable', inlude.rownames=F)
Please note, that the table only fits onto the page if it is rotated sideways.
I would now like to manipulate the entries to add a databar
(see here) command around the percentages in the table
For example:
x <- print(xtable(x, caption="My table"), include.rownames=F
x <- gsub("(\\d{1,3}\\.\\d{2})","\\\\databar{\\1}",x)
The problem is that x
is now a character vector and I can't use print(x, floating.environment='sidewaystable', inlude.rownames=F)
any more.
I can plot the table using cat(x, '\n')
, but of course it won't be rotated sideways then.
Any ideas?