emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: calculating column averages
Date: Fri, 22 Jul 2011 11:24:57 +0200	[thread overview]
Message-ID: <87r55i651y.fsf@gmail.com> (raw)
In-Reply-To: alpine.BSF.2.00.1107220459580.49902@freire1.furyyjbeyq.arg

Jude DaShiell <jdashiel@shellworld.net> 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

  reply	other threads:[~2011-07-22  9:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22  9:06 calculating column averages Jude DaShiell
2011-07-22  9:24 ` Rasmus [this message]
2011-07-22 21:48 ` Ken Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r55i651y.fsf@gmail.com \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).