[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: evaluating rows or columns in org-table
From: |
Bernt Hansen |
Subject: |
Re: [Orgmode] Re: evaluating rows or columns in org-table |
Date: |
Wed, 30 Jul 2008 14:05:07 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
"Gabriel Peters" <address@hidden> 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(@address@hidden),$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