From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: calculating column averages Date: Fri, 22 Jul 2011 11:24:57 +0200 Message-ID: <87r55i651y.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkBxK-0000PJ-Qj for emacs-orgmode@gnu.org; Fri, 22 Jul 2011 05:23:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkBxJ-0000bY-RT for emacs-orgmode@gnu.org; Fri, 22 Jul 2011 05:23:38 -0400 Received: from lo.gmane.org ([80.91.229.12]:52733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkBxJ-0000b4-AD for emacs-orgmode@gnu.org; Fri, 22 Jul 2011 05:23:37 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QkBxE-0007qF-AY for emacs-orgmode@gnu.org; Fri, 22 Jul 2011 11:23:32 +0200 Received: from 0x555293e1.adsl.cybercity.dk ([85.82.147.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Jul 2011 11:23:32 +0200 Received: from rasmus by 0x555293e1.adsl.cybercity.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Jul 2011 11:23:32 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Jude DaShiell writes: > In this case I don't want to tell org-mode how many rows to calculate, and > I put a table together with an averages line in its own footer section. I > prefer when doing these things to output final averages and totals just > under table headers then go down into detail records after that. Could > someone take a look at the following table and tell me how to get an > average on column 2 of this table? I am not sure I quite follow but this might be what you're after: | Date Stamp | Systalic | Diastalic | Pulse | |------------------------+----------+-----------+-------| | [2011-07-19 Tue 02:26] | 138 | 92 | 74 | | [2011-07-21 Thu 03:50] | 128 | 79 | 76 | | [2011-07-20 Wed 04:03] | 130 | 85 | 74 | | [2011-07-22 Fri 02:33] | 121 | 80 | 79 | | | | | | |------------------------+----------+-----------+-------| | Averages | 129.25 | | | #+TBLFM: @7$2=vmean(@2..@-1) The field @7$2 calculates the average (vmean) from line 2 (@2) to the line just above itself (@-1). –Rasmus -- Sent from my Emacs