[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Field coordinates and moving averages
From: |
Benjamin Beckwith |
Subject: |
[O] Field coordinates and moving averages |
Date: |
Tue, 15 Nov 2011 10:21:40 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
I'm trying to create a table of periodic data and calculate a moving
average in an adjacent column. I was trying to use field coordinates,
but they do not work how I would like them to work.
Here is what I have for a 5-day moving average:
| Daily Data | Moving Average |
|------------+----------------|
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 14 | |
| 16 | |
#+TBLFM: $2=if(@# >=7, vmean(@address@hidden),string(""));
I expeced the if(@# >=7..) to protect the sub-clauses from executing
unless the predicate is true. However, that is not the case. When I
try to execute this formula, I receive the error: "Row descriptor -5
used in line ### leads outside table".
I can see how this is true if the ranges are checked for every entry.
Is there a better way for me to write this column forumla? Is this a
limitation in the field coordinates?
Thanks,
Ben
- [O] Field coordinates and moving averages,
Benjamin Beckwith <=