emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 3 beginner table questions
@ 2014-05-06  7:51 Ryan Moszynski
  2014-05-22 21:31 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan Moszynski @ 2014-05-06  7:51 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-22 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06  7:51 3 beginner table questions Ryan Moszynski
2014-05-22 21:31 ` Bastien

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).