emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ryan Moszynski <ryan.moszynski@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: 3 beginner table questions
Date: Tue, 6 May 2014 02:51:08 -0500	[thread overview]
Message-ID: <CAKEe=vdpaCasyzNQDWRDchPsLEho_ADTN5v1C2W_JtC5-V3-tw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3087 bytes --]

So, i'm using org mode to keep track of my workouts on a rowing machine and
need help with 3 questions to allow me to finish off my table.
The questions are based on the provided table, which is what I have so far.

1: in @4$4 and @4$7
i'm using vmean on a column of HMS values, how do I floor or round to the
nearest second, so I don't get fractions of seconds in my output?
$4=0@ 16' 6.3333333"
to
$4=0@ 16' 6"

2: i'm lazy and i don't want to type in the split time since I can derive
it from the Watts column.
pace(or 500m split time) from watts formula - 3rd root(2.8/watts)
so
if W = 66 then pace= 3rdRt(2.8/66) = 0.3487 * 500 = 174 seconds = 0@ 2' 54"
so
if $11 = 66, whats the best way to put $7 = 0@ 2' 54"?
does this call for a lisp function where the output is a text string, or is
there an easier/TBLFM way?

3:
the $1 column of my table is just an i++ value, 1, 2, 3 ... n where n is
the number of rows between the 2nd and 3rd hline.
is there a function I can call to tell me how many rows are in that part of
my table, or, if I want to be able to refer
to a variable which is the number of rows in my table, do I have to keep
track of it manually like this?
so what I want to be able to do is the following, without having to use a
count up column.
@7$2 = Total(3), where "3" is the number of rows between the 2nd and 3rd
hline

Thanks so much, Ryan Moszynski

|---+---------+-----+-------------------+--------+-----+------------------+------+------+------+----|
|   | date    |  lb | h  m   s          | meters | spm | split500         |
C_c2 | C_rl | C_AB |  W |
|   | May     |     |                   |        |     |                  |
     |      |      |    |
|---+---------+-----+-------------------+--------+-----+------------------+------+------+------+----|
| 1 | 050114  | 236 | 0@ 15' 36"        |   2686 |  29 | 0@ 2' 54"        |
 527 |  632 |  164 | 66 |
| 2 | 050214  | 236 | 0@ 16' 7"         |   2793 |  28 | 0@ 2' 53"        |
 531 |  636 |  170 | 67 |
| 3 | 050414  | 234 | 0@ 16' 36"        |   3023 |  29 | 0@ 2' 44"        |
 568 |  669 |  185 | 78 |
|---+---------+-----+-------------------+--------+-----+------------------+------+------+------+----|
|   | Average | 235 | 0@ 16' 6.3333333" |   2834 |  29 | 0@ 2' 50.333333" |
 542 |  646 |  173 | 70 |
|   | Total   |     | 0@ 48' 19"        |   8502 |     |                  |
     |      |  519 |    |
|---+---------+-----+-------------------+--------+-----+------------------+------+------+------+----|
#+TBLFM:
@6$3=vmean(@II..@III);%.0f::
@7$4=vsum(@II..@III)::
@6$4=vmean(@II..@III)::
@7$5=vsum(@II..@III)::
@6$5=vmean(@II..@III);%.0f::
@6$6=vmean(@II..@III);%.0f::
@6$7=vmean(@II..@III)::
@6$11=vmean(@II..@III);%.0f::
$9=if($8 > 0, vsum($8, -300+$3*1.714), 0);%.0f::
$10=vsum(0, ((3600*deg($4))/3600)*$9);%d::
@7$10=vsum(@II..@III)::
@6$10=vmean(@II..@III);%.0f::
@7$9=string("")::
@6$8=vmean(@II..@III);%.0f::
@6$9=vmean(@II..@III);%.0f::



-- 
He felt that his whole life was some kind of dream and he sometimes
wondered whose it was and whether they were enjoying it. - Douglas Adams

[-- Attachment #2: Type: text/html, Size: 7170 bytes --]

             reply	other threads:[~2014-05-06  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06  7:51 Ryan Moszynski [this message]
2014-05-22 21:31 ` 3 beginner table questions Bastien

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='CAKEe=vdpaCasyzNQDWRDchPsLEho_ADTN5v1C2W_JtC5-V3-tw@mail.gmail.com' \
    --to=ryan.moszynski@gmail.com \
    --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).