Sébastien Vauban writes:
> Hi Dan,
>
> Dan Davison wrote:
>>
>> * meantest
>> #+srcname: calcmean(data=trial)
>> #+begin_src R
>> mean(data)
>> #+end_src
>>
>> #+results: calcmean
>> : 6.5
>>
>> or alternative syntax
>>
>> #+begin_src R :var data=trial
>> mean(data)
>> #+end_src
>>
>> #+results:
Hi Dan,
Dan Davison wrote:
>
> * meantest
> #+srcname: calcmean(data=trial)
> #+begin_src R
> mean(data)
> #+end_src
>
> #+results: calcmean
> : 6.5
>
> or alternative syntax
>
> #+begin_src R :var data=trial
> mean(data)
> #+end_src
>
> #+results:
> : 6.5
As I am as well *learning* Org-babel and
Seb,
I am obviously not following this at all. I am assuming you need to
keep all the code under the same heading so OrgMode knows which table
is being referred to. But if I put the cursor in the table and use C-u
C-c C-c I get a message in the mini buffer, that the formulas are
being re-applied,
Seb
> You must pass somehow the variable you want to work with.
>
> See http://eschulte.github.com/org-babel/org-babel.org.html and its example 1.
Thanks, I will look at the link, I thought I had done this by
assigning a name to the output
#+srcname:trial
and then trying to run the command on t
Hi Graham,
Graham Smith wrote:
> I know I must be missing the obvious here, but why can't I get babel+R
> to calculate a mean. See below
>
> Many thanks,
>
> Graham
>
> * test
> #+srcname:trial
> #+begin_src R
> x<-c(4,5,6,7,8,9)
> #+end_src
>
> #+resname: trial
> | 4 |
> | 5 |
> | 6 |
> | 7 |
> |