I found Boris's suggestion to use
siunitx to achieve number formatting in
Hmisc::latex tables to almost be exactly what I was looking for:
R, Sweave, Hmisc: pretty-print numbers
However, if you look closely at the table, the number columns line up poorly with the column labels. This is worse when using multicolumn labels (e.g., cgroup). In looking at the documentation (page 15, table 9) for siunitx, I think this is because it is centering the numbers at the decimal point.
Is it possible to use the number formatting functions of
siunitx but justify the columns as
\raggedleft (right aligned) within a call to