emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] formatting org-babel output


From: Joe Bogner
Subject: Re: [O] formatting org-babel output
Date: Wed, 22 May 2013 12:27:23 -0400

Eric - That is perfect. It's exactly what I was looking for. Thank you
for very much!

Jay - format is a good option too.I also found the scales packages

> scales::comma(scales::dollar(55555))
[1] "$55,555"

In the end, the org-mode post solution feels more automatic and in the
right layer - since I'm using org-mode for presentation of the R
results.

Thanks again
Joe

On Wed, May 22, 2013 at 9:12 AM, Eric Schulte <address@hidden> wrote:
> Joe Bogner <address@hidden> 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.
>
>
>
> Cheers,
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]