From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: extract a region from a table and export it Date: Thu, 16 Jun 2016 13:23:24 -0400 Message-ID: References: <87oa74vyma.fsf@mat.ucm.es> <87d1nkvuat.fsf@mat.ucm.es> <87oa733g28.fsf@gmx.us> <87porh2jp8.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDb0u-0005bx-Cz for emacs-orgmode@gnu.org; Thu, 16 Jun 2016 13:23:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDb0p-0000gs-9b for emacs-orgmode@gnu.org; Thu, 16 Jun 2016 13:23:31 -0400 Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:33990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDb0p-0000go-57 for emacs-orgmode@gnu.org; Thu, 16 Jun 2016 13:23:27 -0400 Received: by mail-qg0-x22c.google.com with SMTP id k6so30043470qgk.1 for ; Thu, 16 Jun 2016 10:23:27 -0700 (PDT) In-reply-to: <87porh2jp8.fsf@mat.ucm.es> 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: Uwe Brauer Cc: emacs-orgmode@gnu.org (require 'dash) #+tblname: tab2 | 1 | a | 3 | | 2 | b | 4 | | 3 | c | 6 | | 4 | d | 7 | #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (-zip-with 'list c0 c2) #+END_SRC #+RESULTS: | 1 | 3 | | 2 | 4 | | 3 | 6 | | 4 | 7 | Uwe Brauer writes: > > Uwe Brauer writes: > > > See (info "(org) var") in particular the section on "Indexable variable > > values". > > > > Additionally, an empty index, or the single character ‘*’, are both > > interpreted to mean the entire range and as such are equivalent to > > ‘0:-1’, as shown in the following example in which the entire first > > column is referenced. > > > #+NAME: example-table > > | 1 | a | > > > | 2 | b | > > | 3 | c | > > | 4 | d | > > > #+BEGIN_SRC emacs-lisp :var data=example-table[,0] > > data > > #+END_SRC > > > #+RESULTS: > > | 1 | 2 | 3 | 4 | > > It is also not clear to me how you could extract say the first and the > third column from the following table > > | 1 | a | 3 | > | 2 | b | 4 | > | 3 | c | 6 | > | 4 | d | 7 | > > Using your approach? -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu