问题
There are couple of helpful posts round dealing with xtable but no one deals with this as far as my search abilities go.
I would like to adjust row height in xtable (print). I'm printing a data.frame.
print(xtable(...),...)
Please note that I'm already using add.to.row
addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- c(0)
addtorow$command <- c(paste("\\hline \n","\\hline \n",sep=""))
So what I would like to do is to widen the upper
row space:

I have tried all kind of things but always just messing around what I have already nicely done.
回答1:
You could simply use the booktabs option which increases the padding around the horizontal lines
print(xtable(...),booktabs = T)
回答2:
Not sure exactly the context here- if you're using LaTeX or if you're printing the table in html (using R Markdown and rendering as a webpage. In the latter case you can specify padding on the table cells using CSS rules at the top of your document between style tags:
<style>
th,td{
padding:2px 5px 2px 5px;
}
</style>
来源:https://stackoverflow.com/questions/19447577/adjust-row-height-xtable-r