* Re: Suggestion to org-R mode
[not found] <1245919961.7505.23.camel@leviathan>
@ 2009-07-08 3:22 ` Dan Davison
0 siblings, 0 replies; only message in thread
From: Dan Davison @ 2009-07-08 3:22 UTC (permalink / raw)
To: Sami Airaksinen; +Cc: emacs org-mode mailing list
Sami Airaksinen <sami.airaksinen@oulu.fi> 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-08 3:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1245919961.7505.23.camel@leviathan>
2009-07-08 3:22 ` Suggestion to org-R mode Dan Davison
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).