emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] table formula help...


From: Thierry Banel
Subject: Re: [O] table formula help...
Date: Sun, 07 Dec 2014 10:20:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Le 07/12/2014 04:25, Eric Abrahamsen a écrit :
>
> Okay, having fun! This seems like exactly what I was after. A couple of
> things:
>
> I've attached a patch replacing some [a-z] regexps with [:word:], so
> that column names can be written in scripts other than ascii (my tables
> above are actually all in Chinese). I hope that's acceptable.

Not only it is acceptable, it is also very welcome!
Your patch has been pushed to GitHub along with an updated unittests.org
(https://github.com/tbanel/orgaggregate).
Wait for a couple of hours for Melpa to refresh
(http://melpa.org).

> I've changed blank fields to "0" so that I don't get the "NA" strings.
>
> Now I'd like to do more calculations based on the rows in the sum(Chars)
> and sum(Lines) columns.
>
> Ideally I could add a fourth column to the aggregate table, calculated
> from rows in the previous two. Is there any way to make a column
> specification that refers to columns in the same table? The fourth
> column would be defined as:
>
> (sum(prod($2 0.7) prod($3 10))
>
> Where $2 and $3 refer to cells in the aggregated table.

It would be great of course. However I don't know how to do that
cleanly. If we want total flexibility for the formulas, we will end up
duplicating the native features of Org spreadsheet.

> I made that up -- I don't even know if it's valid calc syntax. But
> that's the idea. Or perhaps I should be making a third table based on
> this second one?

This would be the easiest for the time being.

You can also add columns and formulas to the 2nd table in the usual way
(Alt-Shift-RightArrow, then C-c =). But beware that those additions will
be cleared by an aggregate refresh.

> Thanks again!
>
> Eric
>

You are welcome
Thierry




reply via email to

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