|
From: | Achim Gratz |
Subject: | Re: [O] calculate frequencies in a table with calc |
Date: | Wed, 26 Dec 2012 09:28:55 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:10.0.11) Gecko/20121115 Thunderbird/10.0.11 |
Am 25.12.2012 13:59, schrieb Martin Gross:
#+TBLFM: @5$1=vcount(@address@hidden)::@6$1=vcount(map(<if(eq(#1,12),1,[])>,@address@hidden)) With the first formula (@5$1) everything inside and outside the brackets is counted, but with the second (@6$1), where I am asking for the frequency of 12, only what is outside the brackets is considered. How could I also include what is inside the brackets, so I get 4?
The Calc manual tells you that vcount flattens nested vectors, vmap doesn't. Try @6$1=vcount(map(<if(eq(#1,12),1,[])>,vflat(@address@hidden))) for the second formula. -- Achim. (on the road :-)
[Prev in Thread] | Current Thread | [Next in Thread] |