From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rehan Iftikhar Subject: Re: org-collector calculated rows? Date: Wed, 9 Mar 2011 23:14:43 -0800 Message-ID: References: <4387.1299314630@alphaville.dokosmarshall.org> <4437.1299314926@alphaville.dokosmarshall.org> <17363.1299735976@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=38451 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pxa57-0002E0-IE for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 02:14:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pxa56-00041I-1w for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 02:14:45 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:45399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pxa55-00041C-Qe for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 02:14:44 -0500 Received: by iyf13 with SMTP id 13so1699401iyf.0 for ; Wed, 09 Mar 2011 23:14:43 -0800 (PST) In-Reply-To: <17363.1299735976@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org I updated to 7.5, recompiled, and now it works! Thanks for the help! On Wed, Mar 9, 2011 at 9:46 PM, Nick Dokos wrote: > Rehan Iftikhar wrote: > >> I have tried adding >> >> =A0#+TBLFM: @>$>=3Dvmean(I..II) >> >> between the #+BEGIN and #+END lines (after generating a table), but >> when I C-c C-c on #+BEGIN, the table refreshes and removes the #+TBLFM >> line. >> >> I am using org-mode 7.4. Any idea why my formula isn't working? >> > > I don't know why the #+TBLFM line disappears: it does not in my case - > assuming that I've got org-collector loaded: since it's a contrib > package it's not loaded automatically for me and when I tried the > refresh before loading org-collector, *everything* disappeared: the > table and the formula. But once I got the package loaded correctly, > things worked as I described before: if only the formula is in there, it > gets wiped out, but if there is a table along with the formula, the > table gets refreshed and the formula is recalculated. > > BTW, the formula is wrong: it should read > > --8<---------------cut here---------------start------------->8--- > #+TBLFM: @>$>=3Dvmean(@I..II) > --8<---------------cut here---------------end--------------->8--- > > and that also assumes that you are running a very recent version of org, > one that recognizes @> and $>. But neither of these would explain why > the formula is wiped. > > Nick > > PS. I'm using Eric Schulte's standard example from the Worg site: > > --8<---------------cut here---------------start------------->8--- > * Example > > #+BEGIN: propview :id "december" :conds ((string=3D spendtype "food")) :c= ols (ITEM amount) > | "ITEM" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | "amount" | > |----------------------------------+----------| > | "Grocery Store [2008-12-01 Mon]" | =A0 =A056.77 | > | "Restaurant [2008-12-08 Mon]" =A0 =A0| =A0 =A030.67 | > | "Grocery Store [2008-12-09 Tue]" | =A0 =A056.76 | > |----------------------------------+----------| > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| = =A0 =A0 =A0 =A0 =A0| > #+TBLFM: @>$>=3Dvmean(@I..II) > #+END: > > > > #+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example= " > | "ITEM" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | "(+ 400 am= ount)" | > |----------------------------------+------------------| > | "December Spending" =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A00 | > | "Week One" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A00 | > | "Grocery Store [2008-12-01 Mon]" | =A0 =A0 =A0 =A0 =A0 456.77 | > | "Athletic club [2008-12-02 Tue]" | =A0 =A0 =A0 =A0 =A0 =A0475.0 | > | "Week Two " =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A00 | > | "Restaurant [2008-12-08 Mon]" =A0 =A0| =A0 =A0 =A0 =A0 =A0 430.67 | > | "Grocery Store [2008-12-09 Tue]" | =A0 =A0 =A0 =A0 =A0 456.76 | > |----------------------------------+------------------| > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| = =A0 =A0 =A0 =A0259.88571 | > #+TBLFM: @>$>=3Dvmean(@I..II) > #+END: > #+TBLFM: @>$> =3D vmean(@I..II) > ** December Spending =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 :example: > =A0 :PROPERTIES: > =A0 :ID: =A0 =A0 =A0 december > =A0 :END: > > *** Week One > **** Grocery Store [2008-12-01 Mon] > =A0 =A0 :PROPERTIES: > =A0 =A0 :amount: 56.77 > =A0 =A0 :spendtype: food > =A0 =A0 :END: > **** Athletic club [2008-12-02 Tue] > =A0 =A0 :PROPERTIES: > =A0 =A0 :amount: 75.00 > =A0 =A0 :spendtype: health > =A0 =A0 :END: > *** Week Two > **** Restaurant [2008-12-08 Mon] > =A0 =A0 :PROPERTIES: > =A0 =A0 :amount: 30.67 > =A0 =A0 :spendtype: food > =A0 =A0 :END: > **** Grocery Store [2008-12-09 Tue] > =A0 =A0 :PROPERTIES: > =A0 =A0 :amount: 56.76 > =A0 =A0 :spendtype: food > =A0 =A0 :END: > --8<---------------cut here---------------end--------------->8--- > >> >> On Sat, Mar 5, 2011 at 12:48 AM, Nick Dokos wrot= e: >> >> Rehan Iftikhar wrote: >> >> >> >> > =A0 * More Complex Example: displaying the mean of the "Amount" col= umn >> >> > for each week. >> >> > >> > >> > I see that I misread this: the formula calculates the mean of all the = entries, >> > not the mean for each week. Having thought about it for about 10 secon= ds, >> > I cannot think of a way to do that. >> > >> > Nick >> > >> >> >> >> -- >> -Rehan >> > --=20 -Rehan