emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: Finding calc/elisp methods (was: Determine min/max values in a table)
Date: Wed, 2 Aug 2017 16:56:04 +0200	[thread overview]
Message-ID: <2017-08-02T16-48-17@devnull.Karl-Voit.at> (raw)
In-Reply-To: 2017-08-02T14-05-32@devnull.Karl-Voit.at

Hi,

* Karl Voit <devnull@Karl-Voit.at> wrote:
>
> 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.

Leslie helped here by mentioning vmin/vmax which is that obvious
that I do feel embarrassed now ;-)

#+TBLFM: @2$1=vmin(remote(myvalues,@2$1..@>$1))::@2$2=vmax(remote(myvalues,@2$1..@>$1))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)

However, let's make this thread a valuable one by adding a question:
how does somebody find such things? Is there a source of information
where I could find calc methods by "apropos" method together with
elisp methods?

"M-h a minimum" returns only calc-find-minimum which is hardly of
any help in this case. "apropos-documentation" returns more results
but still lacks "vmin".

What is your method of choice to find answers to those kind of
questions? At least my internet search engine of choice did not help
me in the first place.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/

  reply	other threads:[~2017-08-02 14:56 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 ` Karl Voit [this message]
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 ` Determine min/max values in a table Thierry Banel
2017-08-03  9:53   ` 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=2017-08-02T16-48-17@devnull.Karl-Voit.at \
    --to=devnull@karl-voit.at \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /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).