From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Determine min/max values in a table Date: Wed, 2 Aug 2017 14:07:18 +0200 Message-ID: <2017-08-02T14-05-32@devnull.Karl-Voit.at> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcsRC-00072U-K2 for emacs-orgmode@gnu.org; Wed, 02 Aug 2017 08:07:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcsR8-0006TQ-LI for emacs-orgmode@gnu.org; Wed, 02 Aug 2017 08:07:42 -0400 Received: from [195.159.176.226] (port=53896 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcsR8-0006SV-Et for emacs-orgmode@gnu.org; Wed, 02 Aug 2017 08:07:38 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dcsR0-0007ig-9P for emacs-orgmode@gnu.org; Wed, 02 Aug 2017 14:07:30 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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. -- 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/