Roland Donat <roland.do...@gmail.com> writes: > Thorsten Jolitz <tjolitz <at> gmail.com> writes: > >> >> This does the job in Emacs Lisp: >> >> #+TBLNAME: T >> | | x | 1 | >> | ^ | | varx | >> >> #+begin_src emacs-lisp :var x=T[0,-1] >> x >> #+end_src >> >> #+results: >> : 1 >> > > Thanks for the answer but in fact, my objective is precisely to avoid using > the indices of the value I want to pass as input of the code block. > > My goal is to use the cell name reference "varx" which would make the code > block simpler to maintain. Indeed, if I add new data on the top of table T, > I wouldn't have to change the reference in the code block since the name > reference is fixed. > >
Perhaps this can help: http://orgmode.org/worg/org-contrib/babel/examples/lob-table-operations.html Alternatively, you might pass the table to a code block of a language that understands tables, such as an R data frame, and use that language to retrieve values by name. hth, Tom -- Thomas S. Dye http://www.tsdye.com