emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Gabriel Peters <gabrielpeters1000@gmail.com>
Cc: Kene Meniru <kemeniru@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Re: evaluating rows or columns in org-table
Date: Wed, 30 Jul 2008 14:05:07 -0400	[thread overview]
Message-ID: <87ljzjp7sc.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <a1de581d0807301049n38e51ee8lea19044c94431824@mail.gmail.com> (Gabriel Peters's message of "Wed\, 30 Jul 2008 10\:49\:48 -0700")

"Gabriel Peters" <gabrielpeters1000@gmail.com> writes:

> The blank lines do also pose a problem in different approach, one which will
> make use of vector functions in calc. If you allow for no empty lines and one
> extra line toward the end of table, this also can do the computation.
>
> |   | Rank | names      | grade 1 | grade 2 | grade 3 | Total | Letter grade |
> |---+------+------------+---------+---------+---------+-------+--------------|
> | # |    1 | student 01 |   91.80 |   96.40 |   97.00 | 95.07 | A            |
> | # |    2 | student 03 |   92.00 |   95.14 |   97.00 | 94.71 | A            |
> | # |    3 | student 02 |   88.78 |   89.15 |   98.00 | 91.98 | A            |
> | # |    4 | student 04 |   84.00 |   74.62 |   88.00 | 82.21 | B            |
> |---+------+------------+---------+---------+---------+-------+--------------|
> #+TBLFM: $2=find(rsort(@I$7..@II$7),$7)::$7=($4+$5+$6)/3;%.2f::$8=if($7
> <60,F,if($7<70,D,if($7<80,C,if($7<90,B,A))))

Cool :) I learn something new everyday!  And this doesn't require that
you sort the entries first to get it right - so I like Gabriel's
solution better.

This way you are free to sort the table anyway you like and the data is
still correct.

-Bernt

      reply	other threads:[~2008-07-30 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 14:08 evaluating rows or columns in org-table Kene Meniru
2008-07-30 15:21 ` Bernt Hansen
2008-07-30 16:12   ` Bernt Hansen
2008-07-30 16:16     ` Bernt Hansen
2008-07-30 17:49       ` Gabriel Peters
2008-07-30 18:05         ` Bernt Hansen [this message]

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=87ljzjp7sc.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=gabrielpeters1000@gmail.com \
    --cc=kemeniru@gmail.com \
    /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).