all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Jude DaShiell <jdashiel@shellworld.net>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: calculating column averages follow up
Date: Fri, 22 Jul 2011 06:55:09 -0400	[thread overview]
Message-ID: <11092.1311332109@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Jude DaShiell <jdashiel@shellworld.net> of "Fri, 22 Jul 2011 05:35:42 EDT." <alpine.BSF.2.00.1107220533320.50904@freire1.furyyjbeyq.arg>

Jude DaShiell <jdashiel@shellworld.net> wrote:

> I removed a separator line above averages and removed a row with blank 
> fields and ran the calculation on this table and it does have a defective 
> formula but I don't know where the defect is now.
> 
> | 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               |   #ERROR |           |       |   |   |   |   |   |   |   |
> |                        |          |         - |       |   |   |   |   |   |   |   |
> |                        |          |           |       |   |   |   |   |   |   |   |
> #+TBLFM: $2=vmean(@<..@>)
> 

Two problems: 1) you want to set a single cell but the way the formula is written
makes it a column formula  and 2) the rows as written include the header line and go
all the way to the bottom - assuming you want the two rows after the "Averages" row,
you can say

#+TBLFM: @>>>$2=vmean(@<<..@>>>>)

That says "the third row from the bottom in column two is the mean of the rows in the
same column, ranging from second from the top to fourth from the bottom".

I thought I could use references relative to @> (e.g. @>-3) but apparently that's
not the case:

#+TBLFM: @>>>$2=vmean(@<<..@>-3)

does not work for me.

Nick

  reply	other threads:[~2011-07-22 10:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22  9:35 calculating column averages follow up Jude DaShiell
2011-07-22 10:55 ` Nick Dokos [this message]
2011-07-23  8:56   ` Jude DaShiell
2011-07-23  9:39     ` Achim Gratz

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

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

  git send-email \
    --in-reply-to=11092.1311332109@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jdashiel@shellworld.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.