Re: [O] Babel introduction example cannot be executed

2014-10-05 Thread Thomas S. Dye
Aloha,

jenia.iv...@gmail.com (jenia.ivlev) writes:

 Hello.

 I want to run one of the examples on babel page. Normally, it's the simplest
 example the world has ever seen. I have a table of numbers and I want to
 take the evage of those number.

I pushed up some changes to
http://orgmode.org/worg/org-contrib/babel/intro.html#spreadsheet.
Hopefully, this will work for you now.

Also, I couldn't find mention in the Org-mode manual of the org-sbe
function.  I use this to set buffer local variables, and the example
jenia.ivlev points to uses it in a table formula (which I don't use).
Shouldn't this function be documented in the manual?

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



[O] Babel introduction example cannot be executed

2014-10-04 Thread jenia.ivlev

Hello.

I want to run one of the examples on babel page. Normally, it's the simplest
example the world has ever seen. I have a table of numbers and I want to
take the evage of those number.

Here is how I did it.

Attemp 1:

#+name: tbl-example-data()
#+begin_src R 
runif(n=5, min=0, max=1)
#+end_src

#+RESULTS: tbl-example-data
| 0.640676139388233 |
| 0.509703768184409 |
| 0.979426965117455 |
| 0.560781393200159 |
| 0.793947959318757 |

#+name: R-mean(x)
#+begin_src R 
mean(x)
#+end_src

When I execute the code here emacs tells me:
Variable x in block R-mean must be assigned a default value.

So what I didn was assign it a default value like so:

#+name: R-mean(x)
#+begin_src R :var x=tbl-example-data
mean(x)
#+end_src


It tells me the exact same thing. What should I change here?

Thanks in advance for your time and kind concern.