András Major <andras.g.ma...@gmail.com> writes: > Hi Eric, > >> > I've been away since my last post and now you've already applied a patch >> > -- wow! Here's another thought though: change the behaviour of the :var >> > header argument such that you can specify a range of rows, columns, or >> > a rectangle just like in table references. >> >> This is already possible, see "Indexable variable values" [1]. > > Oh, sorry that I missed that. I'll try it with indexed variables then. > Still the question arises why the syntax here is different from usual > table indexing -- why can't I use something along the lines of > ":var t=table(@II$2..@>$4)"? >
The table indexing syntax is specifically used for 2-dimensional arrays while the variable indexing can be used to index into any number of dimensions. > > That would be really really nice. Would it be hard to implement? > It would be nice to be able to use the familiar table syntax in the case of 2-D arrays. This shouldn't be hard to implement, the indexing behavior is defined in the `org-babel-ref-index-list' function which could be extended to read in org-table type syntax, or it may not be difficult to write a function which translates the table syntax to the variable syntax. Although ultimately it may be simpler just to keep the two separate. Best -- Eric > > András > > > -- Eric Schulte http://cs.unm.edu/~eschulte/