* Can I quote/ref value in the output table?
@ 2016-07-12 7:59 Xi Shen
2016-07-12 15:17 ` John Kitchin
0 siblings, 1 reply; 2+ messages in thread
From: Xi Shen @ 2016-07-12 7:59 UTC (permalink / raw
To: emacs-orgmode@gnu.org
Hi,
Say I have a sql babel block which outputs a table. Is there any way
that I can reference the values in the output table in another babel
block?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can I quote/ref value in the output table?
2016-07-12 7:59 Can I quote/ref value in the output table? Xi Shen
@ 2016-07-12 15:17 ` John Kitchin
0 siblings, 0 replies; 2+ messages in thread
From: John Kitchin @ 2016-07-12 15:17 UTC (permalink / raw
To: Xi Shen; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
Do you mean something like this (I used an elisp block instead of a sql
block, but hopefully you get the idea):
#+name: src-block1
#+BEGIN_SRC emacs-lisp
'((1 2) (3 4))
#+END_SRC
#+RESULTS: src-block1
| 1 | 2 |
| 3 | 4 |
#+BEGIN_SRC python :var data=src-block1
print data
#+END_SRC
#+RESULTS:
: [[1, 2], [3, 4]]
If so, give your sql block a name, and use it as a variable in some other
block.
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Tue, Jul 12, 2016 at 3:59 AM, Xi Shen <davidshen84@gmail.com> wrote:
> Hi,
>
> Say I have a sql babel block which outputs a table. Is there any way
> that I can reference the values in the output table in another babel
> block?
>
>
[-- Attachment #2: Type: text/html, Size: 1527 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-12 15:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-12 7:59 Can I quote/ref value in the output table? Xi Shen
2016-07-12 15:17 ` John Kitchin
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.