[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How to do a sum of products in a table?
From: |
Alan Schmitt |
Subject: |
Re: [O] How to do a sum of products in a table? |
Date: |
Fri, 14 Jun 2013 20:53:04 +0200 |
User-agent: |
mu4e 0.9.9.5; emacs 24.3.1 |
Rasmus writes:
> So perhaps you'd want something like this
>
> | | Name | Grade | Question 1 | Question 2 | Question 3 |
> | ! | | grade | q1 | | q3 |
> | _ | | g | | | |
> | / | Coeff | 6 | 1 | 3 | 2 |
> |---+-----------+-----------+------------+------------+------------|
> | * | Foo | 6.67 | 1/2 | 1 | 1/4 |
> | * | Bar | 6.67 | 1 | 1 | 0 |
> | * | Baz | 7.5 | 1 | 3/2 | -1/2 |
> |---+-----------+-----------+------------+------------+------------|
> | _ | | mean | | max | |
> | | Mean | 6.9444445 | std.dev. | 0.48112521 | |
> | $ | Constants | magic=10 | | | |
> |---+-----------+-----------+------------+------------+------------|
> #+TBLFM: $g=vsum($q1..$q3):: $3=round(@address@hidden/$g,2)::
> #+TBLFM: $mean=vmean(@I$grade..II$grade)::$max=vsdev(@I$grade..II$grade)
>
> It even exports pretty tables so you could hardly wish for more.
Thanks, this is great! I had no idea multiplying ranges would do the
right thing.
Thanks again,
Alan