* Babel introduction example cannot be executed
@ 2014-10-05 5:19 jenia.ivlev
2014-10-05 18:56 ` Thomas S. Dye
0 siblings, 1 reply; 2+ messages in thread
From: jenia.ivlev @ 2014-10-05 5:19 UTC (permalink / raw)
To: emacs-orgmode
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Babel introduction example cannot be executed
2014-10-05 5:19 Babel introduction example cannot be executed jenia.ivlev
@ 2014-10-05 18:56 ` Thomas S. Dye
0 siblings, 0 replies; 2+ messages in thread
From: Thomas S. Dye @ 2014-10-05 18:56 UTC (permalink / raw)
To: jenia.ivlev; +Cc: emacs-orgmode
Aloha,
jenia.ivlev@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-05 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-05 5:19 Babel introduction example cannot be executed jenia.ivlev
2014-10-05 18:56 ` Thomas S. Dye
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).