I try to use print.xtable
add.to.row
to get table formatted like this:
sports
share of ballers 22.3
share of skiers 4.6
addiction
share of smokers 20.3
share of drinkers 6.6
My R table does contain the additional row.names even if these rows don't contain any values. I used the add.to.row option to add colors to the different rows like suggested here which worked fine. But what does not work is to add bold text with xtable or add additional hline
between the rows. I always get an error message like:
Bad type area settings!
The detected line width is about 52 % (typearea) larger than the heuristically determined line width.
So this could mean the table gets to big for its environment because of my changes, but do not have an idea what to do about it. Note I have reads posts like this one that modifies the xtable output itself, but even though this might possible for me to I am looking for an easier solution. Because if I go for this solution I had to capture.output
and use regexp replacement to add something in between.
Is there a way around this? Or is there a simpler solution?
For the
hline
part, see?print.xtable
.To embolden all you rows names:
To embolden some row names, you can add a " special markup" to those rows, e.g.
BOLD
:e.g: