From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: orgtbl-aggregate on Melpa Date: Tue, 11 Nov 2014 12:26:36 +0100 Message-ID: <5461F26C.7030408@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xo9at-0005Tv-HI for emacs-orgmode@gnu.org; Tue, 11 Nov 2014 06:26:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xo9ap-00056B-3b for emacs-orgmode@gnu.org; Tue, 11 Nov 2014 06:26:43 -0500 Received: from smtp6-g21.free.fr ([212.27.42.6]:17117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xo9ao-000560-UO for emacs-orgmode@gnu.org; Tue, 11 Nov 2014 06:26:39 -0500 Received: from [IPv6:2a01:e35:2e21:def0:81f9:c4da:8313:f937] (unknown [IPv6:2a01:e35:2e21:def0:81f9:c4da:8313:f937]) by smtp6-g21.free.fr (Postfix) with ESMTP id 7DD57822E8 for ; Tue, 11 Nov 2014 12:24:34 +0100 (CET) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi The List My orgtbl-aggregate package is now available on MELPA. It creates an aggragated Org table out of a source table. Example: here are the 15 largest rivers in the World (source: Wikipedia "List_of_rivers_by_length"). #+tblname: rivers | River | Continent | Length | Discharge | |--------------------------------+--------------+--------+-----------| | Nile-Kagera | Africa | 6853 | 5100 | | Amazon-Ucayali-Apur=C3=ADmac | SouthAmerica | 6400 | 219000= | | Yangtze (Chang Jiang) | Asia | 6415 | 31900 | | Mississippi=E2=80=93Missouri=E2=80=93Jefferson | NorthAmerica | 6275 = | 16200 | | Yenisei-Angara-Selenge | Asia | 5539 | 19600 | | Yellow River (Huang He) | Asia | 5464 | 2110 | | Ob-Irtysh | Asia | 5410 | 12800 | | Paran=C3=A1-R=C3=ADo de la Plata | SouthAmerica | 4880 | = 18000 | | Congo-Chambeshi (Za=C3=AFre) | Africa | 4700 | 41800= | | Amur-Argun (Heilong Jiang) | Asia | 4444 | 11400 | | Lena | Asia | 4400 | 17100 | | Mekong (Lancang Jiang) | Asia | 4350 | 16000 | | Mackenzie-Slave-Peace-Finlay | NorthAmerica | 4241 | 10300 | | Niger | Africa | 4200 | 9570 | | Murray-Darling | Australia | 3672 | 767 | We want to aggregate them by continents, with counts, means, and max. To do so type: M-x org-insert-dblock:aggregate or: C-c C-x i #+BEGIN: aggregate :table "rivers" :cols "Continent count() mean(Length) max(Discharge)" | Continent | count() | mean(Length) | max(Discharge) | |--------------+---------+--------------+----------------| | Africa | 3 | 5251 | 41800 | | SouthAmerica | 2 | 5640 | 219000 | | Asia | 7 | 5146 | 31900 | | NorthAmerica | 2 | 5258 | 16200 | | Australia | 1 | 3672 | 767 | #+END: Documentation here: https://github.com/tbanel/orgaggregate/blob/master/README.org --------- To enable MELPA, add those lines to your .emacs: (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) Then browse more than 2000 available packages (including the latest Org Mode and almost 80 Org-related packages) by typing: M-x package-list-packages --------- Comments welcome Have fun Thierry Banel