emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] babel R: should/does order of parameters matter?


From: Myles English
Subject: [O] babel R: should/does order of parameters matter?
Date: Sun, 20 Mar 2011 14:19:46 +0000

Hello,

First of all thanks very much for all the very well explained help
given in previous threads I have started.

Now, I have found different results arise from a difference in position
of parameters (I'm using commit c01c2ad Fri Mar 18, R version 2.12.20,
Feb 25):


#+TBLNAME: data
| x | parameter | value |
|---+-----------+-------|
| 0 | heat      |    30 |
| 1 | heat      |    30 |

This next block works as I expect and returns the column names:

#+source: namesNFirst
#+begin_src R  :var N :var tbl :var param :colnames yes
       names(tbl)
#+end_src

#+call: namesNFirst(N=10,tbl=data,param="heat")

#+results: namesNFirst(N=10,tbl=data,param="heat")
| x         |
| parameter |
| value     |

Now, I would expect this to return the same result as above:

#+source: namesNLast
#+begin_src R  :var tbl :var param :var N :colnames yes 
       names(tbl)
#+end_src

#+call: namesNLast(tbl=data,param="heat",N=10)

but it doesn't:

#+results: namesNLast(tbl=data,param="heat",N=10)
| X0   |
| heat |
| X30  |

Removing the string parameter 'param', and again it works as expected:

#+source: namesNoParam
#+begin_src R  :var tbl :var N :colnames yes 
       names(tbl)
#+end_src

#+call: namesNoParam(tbl=data,N=10)

#+results: namesNoParam(tbl=data,N=10)
| x         |
| parameter |
| value     |

I can't find any difference R-side when using :session.  At this stage
I am asking for help; is this intended or a bug?.

Thanks.

Myles



reply via email to

[Prev in Thread] Current Thread [Next in Thread]