emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [Babel] Header arguments


From: Eric Schulte
Subject: Re: [O] [Babel] Header arguments
Date: Sat, 14 May 2011 08:05:08 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

address@hidden (Thomas S. Dye) writes:

> Aloha all,
>
> I have a little function that graphs two 14C dates (below).  The data
> are held in tables produced by a software package that I access on the
> web.  I read these into Org-mode and give them a #+tblname:, as shown
> below.  I'd like to have one function that will graph any number of tables
> but I don't know how to package up the table references and get them
> inside the function.  If I put them in a table, they end up as strings
> inside the function.
>

Hi Tom,

The following example might work, it uses an emacs-lisp code block to
wrap any number of tables into a single list of tables which could then
be passed to R.

#+data: table-names
- first-table
- second-table
- third-table

#+data: first-table
| a | 1 |
| b | 2 |

#+data: second-table
| c | 3 |
| d | 4 |

#+data: third-table
| e | 5 |
| f | 6 |

#+begin_src emacs-lisp :var table-names=table-names
  (mapcar #'org-babel-ref-resolve table-names)
#+end_src

#+results:
| (a 1) | (b 2) |
| (c 3) | (d 4) |
| (e 5) | (f 6) |

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]