* ranges of rows in other columns
@ 2006-06-26 20:39 Austin Frank
2006-06-28 4:13 ` T. V. Raman
2006-06-28 9:20 ` Carsten Dominik
0 siblings, 2 replies; 3+ messages in thread
From: Austin Frank @ 2006-06-26 20:39 UTC (permalink / raw)
To: emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello all--
I'm looking for help in setting up a calculation in a table in org mode.
I'd like to keep a running average of my past three days worth of
measurements. Something like
|------------------+-----------------+-----------------|
| Date | TV Time (hours) | Running Average |
|------------------+-----------------+-----------------|
| <2006-06-24 Sat> | 1 | |
| <2006-06-25 Sun> | 1.5 | |
| <2006-06-26 Mon> | .5 | 1 |
| <2006-06-27 Tue> | 3 | 1.66 |
| <2006-06-28 Wed> | 2.5 | 2 |
|------------------+-----------------+-----------------|
I just did the numbers for running average in my head-- I'm hoping for
help with a formula that will get the mean for the last three rows of
the `TV Time' column. I tried using $3=vsum($2&3-1), but this didn't
work.
Is there a syntax for accessing row ranges of other columns for a
calculation? If not, can anyone suggest an elisp formula that will
accomplish this?
If a helpful soul is feeling especially generous, is there also a way to
set this table up that will calculate the new running average every time
I enter a new date's measurement? Extra credit if you use Carsten's
constants.el to provide units in the measurment column and the
calculated column ;)
Thanks for any help,
/au
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEoEX8lHMl2/XbR4ERAgQMAKDb48ZGq4JlA8NU4g6jBtV/BG3DBwCfb5at
OHz4gmF2ONOcPhOUPGWbXow=
=zkAf
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* ranges of rows in other columns
2006-06-26 20:39 ranges of rows in other columns Austin Frank
@ 2006-06-28 4:13 ` T. V. Raman
2006-06-28 9:20 ` Carsten Dominik
1 sibling, 0 replies; 3+ messages in thread
From: T. V. Raman @ 2006-06-28 4:13 UTC (permalink / raw)
To: austin.frank; +Cc: emacs-orgmode
calc may be your friend here.
We should create a couple recipes for passing a row or column
from org to calc and getting it back -- then we can do all the
computes on the calc side.
Calc has an "embed" mode that works very well out of the box
inside text LaTeX and consequently org files; would be nice to
take org's table minor mode and couple it with calc's vector
capabilities
>>>>> "Austin" == Austin Frank <austin.frank@gmail.com> writes:
Austin> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Austin>
Austin> Hello all--
Austin>
Austin> I'm looking for help in setting up a calculation in a
Austin> table in org mode. I'd like to keep a running
Austin> average of my past three days worth of measurements.
Austin> Something like
Austin>
Austin> |------------------+-----------------+-----------------|
Austin> | Date | TV Time (hours) | Running Average |
Austin> |------------------+-----------------+-----------------|
Austin> | <2006-06-24 Sat> | 1 | | | <2006-06-25 Sun> | 1.5 |
Austin> | | <2006-06-26 Mon> | .5 | 1 | | <2006-06-27 Tue> |
Austin> 3 | 1.66 | | <2006-06-28 Wed> | 2.5 | 2 |
Austin> |------------------+-----------------+-----------------|
Austin>
Austin> I just did the numbers for running average in my
Austin> head-- I'm hoping for help with a formula that will
Austin> get the mean for the last three rows of the `TV Time'
Austin> column. I tried using $3=vsum($2&3-1), but this
Austin> didn't work.
Austin>
Austin> Is there a syntax for accessing row ranges of other
Austin> columns for a calculation? If not, can anyone
Austin> suggest an elisp formula that will accomplish this?
Austin>
Austin> If a helpful soul is feeling especially generous, is
Austin> there also a way to set this table up that will
Austin> calculate the new running average every time I enter
Austin> a new date's measurement? Extra credit if you use
Austin> Carsten's constants.el to provide units in the
Austin> measurment column and the calculated column ;)
Austin>
Austin> Thanks for any help, /au -----BEGIN PGP
Austin> SIGNATURE----- Version: GnuPG v1.4.3 (Darwin)
Austin> Comment: Using GnuPG with Mozilla -
Austin> http://enigmail.mozdev.org
Austin>
Austin> iD8DBQFEoEX8lHMl2/XbR4ERAgQMAKDb48ZGq4JlA8NU4g6jBtV/BG3DBwCfb5at
Austin> OHz4gmF2ONOcPhOUPGWbXow= =zkAf -----END PGP
Austin> SIGNATURE-----
Austin>
Austin>
Austin> _______________________________________________
Austin> Emacs-orgmode mailing list Emacs-orgmode@gnu.org
Austin> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
Best Regards,
--raman
Email: raman@users.sf.net
WWW: http://emacspeak.sf.net/raman/
AIM: emacspeak GTalk: tv.raman.tv@gmail.com
PGP: http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman
IRC: irc://irc.freenode.net/#emacs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ranges of rows in other columns
2006-06-26 20:39 ranges of rows in other columns Austin Frank
2006-06-28 4:13 ` T. V. Raman
@ 2006-06-28 9:20 ` Carsten Dominik
1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2006-06-28 9:20 UTC (permalink / raw)
To: Austin Frank; +Cc: emacs-orgmode
Unfortunately, this is beyond the current syntax
envelope for table equations in org-mode.
I could widen that envelope, but not soon.
- Carsten
On Jun 26, 2006, at 22:39, Austin Frank wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello all--
>
> I'm looking for help in setting up a calculation in a table in org
> mode.
> I'd like to keep a running average of my past three days worth of
> measurements. Something like
>
> |------------------+-----------------+-----------------|
> | Date | TV Time (hours) | Running Average |
> |------------------+-----------------+-----------------|
> | <2006-06-24 Sat> | 1 | |
> | <2006-06-25 Sun> | 1.5 | |
> | <2006-06-26 Mon> | .5 | 1 |
> | <2006-06-27 Tue> | 3 | 1.66 |
> | <2006-06-28 Wed> | 2.5 | 2 |
> |------------------+-----------------+-----------------|
>
> I just did the numbers for running average in my head-- I'm hoping for
> help with a formula that will get the mean for the last three rows of
> the `TV Time' column. I tried using $3=vsum($2&3-1), but this didn't
> work.
>
> Is there a syntax for accessing row ranges of other columns for a
> calculation? If not, can anyone suggest an elisp formula that will
> accomplish this?
>
> If a helpful soul is feeling especially generous, is there also a way
> to
> set this table up that will calculate the new running average every
> time
> I enter a new date's measurement? Extra credit if you use Carsten's
> constants.el to provide units in the measurment column and the
> calculated column ;)
>
> Thanks for any help,
> /au
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFEoEX8lHMl2/XbR4ERAgQMAKDb48ZGq4JlA8NU4g6jBtV/BG3DBwCfb5at
> OHz4gmF2ONOcPhOUPGWbXow=
> =zkAf
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-28 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-26 20:39 ranges of rows in other columns Austin Frank
2006-06-28 4:13 ` T. V. Raman
2006-06-28 9:20 ` Carsten Dominik
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.