emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Finding calc/elisp methods (was: Determine min/max values in a table


From: Karl Voit
Subject: [O] Finding calc/elisp methods (was: Determine min/max values in a table)
Date: Wed, 2 Aug 2017 16:56:04 +0200
User-agent: slrn/pre1.0.0-18 (Linux)

Hi,

* Karl Voit <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]