> > #+TBLNAME: data > | x | parameter | value | > |---+-----------+-------| > | 0 | heat | 30 | > | 1 | heat | 30 | > > #+source: func5 > #+begin_src R :var name=data :var a="one" :colnames yes > names(name) > #+end_src > > executing directly works as expected: > > #+results: func5 > | x | > |-----------| > | x | > | parameter | > | value | >
Agreed. > > try a basic call (ignores :colnames): > > #+call: func5(name=data, a="two") > > #+results: func5(name=data, a="two") > | x | > | parameter | > | value | > Yes, that is because the :colnames header argument applies to the original code block, but not to the call line. Pass the :colnames header argument to call line as follows #+call: func5(name=data, a="two") :colnames yes #+results: func5(name=data, a="two") | x | |-----------| | x | | parameter | | value | see http://orgmode.org/manual/Evaluating-code-blocks.html for information on the call line syntax > > however, with the table argument last: > > #+call: func5(a="two",name=data) > > #+results: func5(a="two",name=data) > | X0 | > | heat | > | X30 | > > of course I have also tried swapping the order of the arguments > in the source block (and the #+calls) and the statement still stands. > Hmm, now this is weird, the order of the arguments should matter to the call line, since they are named, they should map directly to the appropriate variable in the original code block. I'll have to look into this, thanks for bringing it up. > > Is this confirmable as a bug or have I gone wrong again somewhere? > The order of arguments issue is a bug, however the :colnames behavior is as expected (although the semantics of header arguments in call lines are admittedly tricky). Thanks -- Eric > > Thanks, > > Myles