knit_hooks$set(inline = function(x) {
prettyNum(round(x,2), big.mark=",")
})
Actually rounding comes by default according to getOption('digits'),
but prettyNum() is not supported in the default hook. Almost
everything about output in knitr is a matter of default vs
customization. I have to make the default more general, so I cannot
make the comma format into the default hook. Of course I can make the
default hook accept outside options, as long as they are convincing.
Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA