[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] very long table calc expressions ?
From: |
Uwe Brauer |
Subject: |
[O] very long table calc expressions ? |
Date: |
Tue, 19 Jun 2018 19:21:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Hi
Take the following example
#+TBLNAME: data
| Name | Cual 1 |
|------+--------|
| A | NT |
| B | NT |
| C | MH |
| D | AP |
| E | MH |
| F | SS |
| G | NP |
| H | NP |
| I | NP |
| | NT |
| | AP |
| | AP |
| | AP |
| | AP |
| | SB |
#+TBLNAME: stat-final2
| | Frequency |
|----+-----------|
| SS | 1 |
| AP | 5 |
| NT | 3 |
| SB | 1 |
| MH | 2 |
| NP | 3 |
#+TBLFM: @>$2='(length (org-lookup-all "NP" '(remote(data,@2$2..@>I$2))
nil))::@>>$2='(length (org-lookup-all "MH" '(remote(data,@2$2..@>I$2))
nil))::@>>>$2='(length (org-lookup-all "SB" '(remote(data,@2$2..@>I$2))
nil))::@>>>>$2='(length (org-lookup-all "NT" '(remote(data,@2$2..@>I$2))
nil))::@>>>>>$2='(length (org-lookup-all "AP" '(remote(data,@2$2..@>I$2))
nil))::@>>>>>>$2='(length (org-lookup-all "SS" '(remote(data,@2$2..@>I$2)) nil))
Are there any rules to break this very long expression?
Thanks
Uwe Brauer