Joe Bogner writes: > I am using org-mode and babel with R for reproducible research. I > would like certain numbers in the output tables to be formatted for > easier reading - such as eliminating decimals and adding commas for > readability. > > The best I came up with is to use a TBLFM line at the bottom of my > results table using a function I found on the ElispCookbook on > emacswiki. A simple example is below that doesn't require R to > reproduce. > > It's a two step process currently to execute the R code in org-babel > and then jump to the result table TBLFM line and Ctrl+c Ctrl+c to > format the table > > Is there a better way to format table outputs for simple things like > currency? I would be content if it's only during the org export > process too > You can use the recently introduced :post header argument to post-process the output of a code block. The following example demonstrates the use of this argument to apply your number-grouper function to table output.