emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Babel] Header arguments
Date: Sat, 14 May 2011 08:05:08 -0600	[thread overview]
Message-ID: <87vcxd73ee.fsf@gmail.com> (raw)
In-Reply-To: m1mxiqj8gc.fsf@tsdye.com

tsd@tsdye.com (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/

      parent reply	other threads:[~2011-05-14 14:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14  2:56 [Babel] Header arguments Thomas S. Dye
2011-05-14  4:04 ` Nick Dokos
2011-05-14 14:05 ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcxd73ee.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tsd@tsdye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).