[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] very long table calc expressions ?
From: |
Uwe Brauer |
Subject: |
Re: [O] very long table calc expressions ? |
Date: |
Thu, 21 Jun 2018 15:35:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Le 20/06/2018 11:09, Uwe Brauer a écrit :
> I included such an example (and added your name to the contributors list).
Thanks! I don't feel that I am a contributor, but thanks very much.
> Not easily. orgaggregate groups rows using equality, whereas you need to
> group rows based on intervals (between 5 and 6.9 for example).
> But you can prepare the data table with a new, computed column, telling
> in which interval each value falls:
> #+TBLNAME: raw-data
> | Test | Interval |
> |------+----------|
> | 0 | SS |
> | 1 | SS |
> | 2 | SS |
> | 3 | SS |
> | 4 | SS |
> | 5 | AP |
> | 6 | AP |
> | 7 | NT |
> | 8 | NT |
> | 9 | SB |
> | | NP |
> | | NP |
> | | NP |
> #+TBLFM: $2= "nan"="$1" ? string("NP") : 0<=$1 && $1<=4.9 ? string("SS")
> : 5<=$1 && $1<=6.9 ? string("AP") : 7<=$1 && $1<=8.9 ? string("NT") :
> 9<=$1 && $1<=10 ? string("SB") : string("OTHER");E
> And then orgaggregate can handle it:
> #+BEGIN: aggregate :table "raw-data" :cols "Interval count()"
> | Interval | count() |
> |----------+---------|
> | SS | 5 |
> | AP | 2 |
> | NT | 2 |
> | SB | 1 |
> | NP | 3 |
> #+END:
This is great. I have to play a around with it a bit but it looks
*precisely* what I was looking for since quite a while.
I have to admitd that the complicated structure
#+TBLFM: $2= "nan"="$1" ? string("NP") : 0<=$1 && $1<=4.9 ? string("SS")
I would have never found myself.
Thanks very much. Again I have the feeling that this is a real world
example worth to be mentioned in the documentation (such example make
your package so much more attractive because I presume most users feel
like me, they are overwhelmed by its potential but on able to really use
it). But maybe I am a bit biased :-D
I have not looked into your second part of your answer since the first
seems so useful.
Regards
Uwe
smime.p7s
Description: S/MIME cryptographic signature
- [O] very long table calc expressions ?, Uwe Brauer, 2018/06/19
- Re: [O] very long table calc expressions ?, Bernt Hansen, 2018/06/21
- Re: [O] very long table calc expressions ?, Uwe Brauer, 2018/06/22
- Re: [O] very long table calc expressions ?, Bernt Hansen, 2018/06/22
- Re: [O] very long table calc expressions ?, Uwe Brauer, 2018/06/22
- Re: [O] very long table calc expressions ?, Jonathan Leech-Pepin, 2018/06/22
- Re: [O] very long table calc expressions ?, Uwe Brauer, 2018/06/22
- Re: [O] very long table calc expressions ?, Nick Dokos, 2018/06/22
- Re: [O] very long table calc expressions ?, Thierry Banel, 2018/06/22
- Re: [O] very long table calc expressions ?, Uwe Brauer, 2018/06/22