From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: Determine min/max values in a table
Date: Wed, 02 Aug 2017 23:22:56 +0200 [thread overview]
Message-ID: <598242B0.8010004@free.fr> (raw)
In-Reply-To: <2017-08-02T14-05-32@devnull.Karl-Voit.at>
Le 02/08/2017 14:07, Karl Voit a écrit :
> Hi!
>
> How can I determine minimum and/or maximum value of a table?
>
> Here is my example:
>
> #+NAME: myvalues
> | Values |
> |--------|
> | 4 |
> | 2 |
> | 3 |
> | 7 |
> | 5 |
> | 6 |
>
> | Min | Max | Average | First | Last |
> |--------+--------+---------+-------+------|
> | #ERROR | #ERROR | 4.5 | 4 | 6 |
> #+TBLFM: @2$1='(min (remote(myvalues,@2$1..@>$1)))::@2$2='(max (remote(myvalues,@2$1..@>$1)))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)
>
> My goal is to get min==2 in the first column and max==7 in the
> second.
>
Alternatively you have the orgtbl-aggregate package available on Melpa.
#+BEGIN: aggregate :table "myvalues" :cols "min(Values) max(Values)
mean(Values)"
| min(Values) | max(Values) | mean(Values) |
|-------------+-------------+--------------|
| 2 | 7 | 4.5 |
#+END:
next prev parent reply other threads:[~2017-08-02 21:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 12:07 Determine min/max values in a table Karl Voit
2017-08-02 14:56 ` Finding calc/elisp methods (was: Determine min/max values in a table) Karl Voit
2017-08-02 18:02 ` Finding calc/elisp methods Nick Dokos
2017-08-02 18:22 ` Adonay Felipe Nogueira
2017-08-03 9:58 ` Adam Porter
2017-08-02 21:22 ` Thierry Banel [this message]
2017-08-03 9:53 ` Determine min/max values in a table Adam Porter
2017-08-05 21:20 ` Karl Voit
[not found] ` <c1ddc30d7673477da50fa40d6d00ac2d@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-08-15 16:57 ` Finding calc/elisp methods Eric S Fraga
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=598242B0.8010004@free.fr \
--to=tbanelwebmin@free.fr \
--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).