From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Suggestion to org-R mode Date: Tue, 07 Jul 2009 23:22:05 -0400 Message-ID: <87bpnv3llu.fsf@stats.ox.ac.uk> References: <1245919961.7505.23.camel@leviathan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MONjb-0001eT-1w for emacs-orgmode@gnu.org; Tue, 07 Jul 2009 23:22:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MONjW-0001cY-CZ for emacs-orgmode@gnu.org; Tue, 07 Jul 2009 23:22:14 -0400 Received: from [199.232.76.173] (port=58881 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MONjW-0001cS-6D for emacs-orgmode@gnu.org; Tue, 07 Jul 2009 23:22:10 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:46531) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MONjV-0007eN-Mw for emacs-orgmode@gnu.org; Tue, 07 Jul 2009 23:22:10 -0400 In-Reply-To: <1245919961.7505.23.camel@leviathan> (Sami Airaksinen's message of "Thu, 25 Jun 2009 11:52:41 +0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sami Airaksinen Cc: emacs org-mode mailing list Sami Airaksinen writes: > > But to the point: I have "tons" of tables that have different things, so > that I can keep organized my data (one table with +60 columns is pretty > clumsy to me). And to produce something meaningful stats I would like to > combine these tables (I know that putting them to one big table would > solve my problem). > > So my idea was, > > #+R: intables:"table1","table2",... Rnames:"tab1","tab2",... > > or > > #+R: intables:(table1 tab1)(table2 tab2)... > > or something more generic. > > The goal is that afterwards I could manipulate them as will with raw R, > > #+RR: res <- tab1$varX + tab2$varY #example. I'd prefer not to add the ability to reference multiple tables to org-R, as I'm planning for it to be replaced by org-babel[fn:1], which I'm working on together with Eric Schulte. It's still in development, but you can already do this in org-babel -- here's a simple example in which two org tables are referenced: #+tblname: table1 | 1 | 2 | 3 | | 4 | 5 | 6 | #+tblname: table2 | 4 | 5 | 6 | | 7 | 8 | 9 | #+srcname: multiple-ref-example #+begin_src R :var tab1=table1 :var tab2=table2 tab1 + tab2 #+end_src #+resname: multiple-ref-example | 5 | 7 | 9 | | 11 | 13 | 15 | There's still work to be done, but if you do want to try it, after downloading/cloning the code from github use the following lines to load it: (add-to-list 'load-path "/path/to/org-babel/lisp") (require 'org-babel-init) Dan Footnotes: [fn:1] http://github.com/eschulte/org-babel/tree/master > > I would love to do this myself, but unfortunately my lisp and R skills > are at best amateurish. > > Best Regards, > > Sami Airaksinen > Astronomy Department, Physical Sciences > Oulu University > Finland