From: Tom Short <tshort@epri.com>
To: emacs-orgmode@gnu.org
Subject: Re: org tables and R
Date: Fri, 2 Jan 2009 22:34:41 +0000 (UTC) [thread overview]
Message-ID: <loom.20090102T212235-999@post.gmane.org> (raw)
In-Reply-To: 20081230193550.GA7961@stats.ox.ac.uk
Dan Davison <davison <at> stats.ox.ac.uk> writes:
> There are more details below. The code is at
>
> http://www.stats.ox.ac.uk/~davison/software/org-table-R/org-table-R.el
This is a neat way to interface to R and to make tables more useful to
me. I'm a big user of ESS/R and org-mode, and I've been looking at
ways to use them together more.
If you want to input an org-mode table into R, here's one way to do it
with Dan's TBLR:
| col1 | col2 |
|------+------|
| 1 | 2 |
| 3 | 4 |
#+TBLR: replace:t
#+TBLR:: my.table <<- x
This assigns the table to the global variable "my.table" in R, and
because we have "replace:t", it doesn't append the table with a copy
of itself. That's a little kludgy, maybe an action to give the table a
name could do that a bit more readily.
If you want to reverse that and take an R table and put it into an
org-mode table, you can do this:
| |
#+TBLR:: x <- r.table
If you run "org-table-R-apply" with the cursor in the brackets above,
it will produce the R variable "r.table" in an org-mode table
following that statement.
- Tom
next prev parent reply other threads:[~2009-01-02 22:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-30 19:35 org tables and R Dan Davison
2009-01-02 22:34 ` Tom Short [this message]
2009-01-22 8:09 ` Carsten Dominik
2009-01-22 13:19 ` Graham Smith
[not found] <20081231084619.2353434807@mail2.panix.com>
2008-12-31 19:54 ` Tom Breton (Tehom)
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20090102T212235-999@post.gmane.org \
--to=tshort@epri.com \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.