I am new to LaTeX, Knitr and xtable. Specifically, when constructing a table and then printing it with the xtable package, how can I:
- Bold an entire column, including the header. In my case, the last column of the table is a sum column and that's what I need to be bold. The most similar question I could find on here is: adding rows or boldify single row.names with print.xtables – add something in between rows?
- In Microsoft Word/Excel, it is possible to replace a negative value in the format of "-1" with "(1)". Is this possible in R?
Thank you for all your time and consideration. I have read into the Hmisc package, but don't really understand if it can help me with these problems.
Edit:
The R code chunk that I am working with looks like this.
<<echo=FALSE,results='asis'>>
thirdTable <- table.CalendarReturns(port_returns, digits=2)
tli.table <- xtable(thirdTable, align="rccccccccccccc")
print(tli.table, floating = FALSE, size="\\tiny", scalebox=1.57)
@
To clarify my problem, I would like to be able to format within that R chunk, so that my LaTeX output includes a bolded last column (including header) and negative values replaced with "()" instead of "-".