emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] table formula help...


From: Michael Brand
Subject: Re: [O] table formula help...
Date: Sat, 13 Dec 2014 19:27:19 +0100

Hi Thierry

On Fri, Dec 12, 2014 at 10:04 PM, Thierry Banel <address@hidden> wrote:
> Le 12/12/2014 18:15, Michael Brand a écrit :
> Seems doable.
> Would tie the spreadsheet and orgaggregate seamlessly.
> Very appealing!
>
> Are you willing to help me implement those steps?

Where necessary I try to help.

I would break it down to these commits and take a larger break
after 3):

1) Prepare for Calc syntax: Adapt the "(case fun [...]" of
   orgtbl-aggregate-apply-calc-*-function to move from :cols "sum(x)"
   etc. to :cols "vsum(x)" etc.

   #+BEGIN: aggregate :table test :cols ("Item" "vsum(x)")
   | Item | vsum(x) |
   |------+---------|

2) Add a separate target column header: The "=" is only a suggestion
   how to separate the target column header from the formula.

   #+BEGIN: aggregate :table test :cols ("Item" "Header = vsum(x)")
   | Item | Header |
   |------+--------|

3) Unleash complete Calc syntax: Make use of (org-table-make-reference
   with KEEP-EMPTY and NUMBERS constantly nil and use calc-eval

   #+BEGIN: aggregate :table test :cols ("Item" "Header = 2 * vsum(x)
+ 3 * vmean(y)")
   | Item | Header |
   |------+--------|

4) Add the mode strings "E" and "N": Parse and pass them to KEEP-EMPTY
   and NUMBERS of org-table-make-reference.

   #+BEGIN: aggregate :table test :cols ("Item" "Header = 2 * vsum(x)
+ 3 * vmean(y); EN")
   | Item | Header |
   |------+--------|

5) Someday add more mode strings.

Michael



reply via email to

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