I'm trying to send an Org table as a lisp object to a code block for further processing with an elisp function. For testing I set up two code blocks, one that generates the table and another that receives the table.
The first block works fine:
#+NAME: from-r
#+BEGIN_SRC R :results value :colnames yes
q <- data.frame(something1 = c("a", "b", "c"), something2 = c(1, 5, 100))
q
#+END_SRC
#+RESULTS: from-r
| something1 | something2 |
|------------+------------|
| a | 1 |
| b | 5 |
| c | 100 |
But the second block is not receiving the whole table!
#+BEGIN_SRC emacs-lisp :var the-table=from-r :results output
(print the-table)
#+END_SRC
#+RESULTS:
:
: (("a" 1) ("b" 5) ("c" 100))
Looking at the messages buffer...
executing R code block (from-r)...
Wrote /tmp/babel-1755OIV/ob-input-17558YA
(("something1" "something2") hline ("a" 1) ("b" 5) ("c" 100))
executing Emacs-Lisp code block...
(the-table (quote (("a" 1) ("b" 5) ("c" 100))))
Code block evaluation complete.
...it's clear to me that the output of the 1st block is the complete table but the second block somehow removes the table header. For clarity:
Complete table: (("something1" "something2") hline ("a" 1) ("b" 5) ("c" 100))
Table w/o header: (("a" 1) ("b" 5) ("c" 100))
I'm I missing something?