emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] calculating column averages


From: Rasmus
Subject: Re: [O] calculating column averages
Date: Fri, 22 Jul 2011 11:24:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Jude DaShiell <address@hidden> 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(@address@hidden)


The field @7$2 calculates the average (vmean) from line 2 (@2) to the
line just above itself (@-1).

–Rasmus

-- 
Sent from my Emacs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]