emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] Problems assigning tables as variables using #+CALL and using properties in code blocks and sbe calls
@ 2013-07-19  0:34 Torsten Wagner
  2013-07-19  1:06 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Torsten Wagner @ 2013-07-19  0:34 UTC (permalink / raw)
  To: Org Mode Mailing List

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

Hi,
I have a tables like this:

#+TBLNAME: tablename
| a | b |c | d |
| 1 | 2 |3  |4 |
| z | x | y |w|

#+TBLNAME: othertablename
| a | b |c | d |
| 1 | 2 |3  |4 |
| z | x | y |w|

I have the following code block

#+name: test
#+begin_src python :var table=tablename :exports results
import numpy as np
tab = np.array(table)
return np.array([tab[:,1], tab[:,-1]]).T
#+end_src

If I call that function the result is correct

However using

#+CALL: aushang[:var table=othertablename]() :exports results
or
#+CALL: aushang(table=othertablename) :exports results

does not work. It seem the babel block does not get the table but something
else in case its called by #+CALL:.
In general, how-to refer to a table in #+CALL blocks?

On a similar line: I used $PROP_name to use property values within the sbe
function.
However, how to use the same property as input to a code-block?

+begin_src python :var x=$PROP_name :exports results
and
+begin_src python :var x=name :exports results

did not work

Any ideas?

Thanks

Torsten

[-- Attachment #2: Type: text/html, Size: 1419 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-19 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19  0:34 [babel] Problems assigning tables as variables using #+CALL and using properties in code blocks and sbe calls Torsten Wagner
2013-07-19  1:06 ` Eric Schulte
2013-07-19 11:06   ` Torsten Wagner
2013-07-19 15:57     ` Torsten Wagner
2013-07-19 17:56       ` Rick Frankel

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).