emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Tassilo Horn <tassilo@member.fsf.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Spreadsheet question
Date: Fri, 5 Dec 2008 08:26:46 +0100	[thread overview]
Message-ID: <4B5CC0DE-9FFB-4D8E-BC03-2D1F6D9359BA@uva.nl> (raw)
In-Reply-To: <877i6gcizy.fsf@thinkpad.tsdh.de>

Hi Tassilo,

I can see that this could be confusing, and maybe it should throw an  
error.

The use-ase fo this are running means as column formulas
that would be undefined for he first few rows in.  Consider
the following table:


| i | nn | mean of last 3 |
|---+----+----------------|
| 1 |  4 |           4.00 |
| 2 |  7 |           5.50 |
| 3 |  2 |           4.33 |
| 4 |  4 |           4.33 |
| 5 |  5 |           3.67 |
| 6 |  7 |           5.33 |
| 7 |  9 |           7.00 |
| 8 | 22 |          12.67 |
#+TBLFM: $3=vmean([@-2$-1..$-1]);%.2f

I am not sure how common this use is and who would
be hurt by turning this behavior into an error.

- Carsten

On Dec 4, 2008, at 11:49 AM, Tassilo Horn wrote:

> Carsten Dominik <dominik@science.uva.nl> writes:
>
> Hi Carsten,
>
>> @-1 references the row above the current.  If that is a hline, if
>> actually references the current line.
>
> Yes, I see that, but I wonder if that's actually the right thing to  
> do.
> IMO defaulting to some cell/row/column which is not referenced  
> correctly
> might obscure wrong formulas.
>
> For example, in my case the first calculation gave 2 which is correct
> and only the second recalculation shows me that the forumla is wrong.
> So I'd prefer an #ERROR if a reference doesn't exist.
>
> Bye,
> Tassilo

  reply	other threads:[~2008-12-05  8:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 21:34 Spreadsheet question Tassilo Horn
2008-12-04  8:06 ` Carsten Dominik
2008-12-04 10:49   ` Tassilo Horn
2008-12-05  7:26     ` Carsten Dominik [this message]
2008-12-05 12:23       ` Carsten Dominik

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=4B5CC0DE-9FFB-4D8E-BC03-2D1F6D9359BA@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=tassilo@member.fsf.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).