emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Babel introduction example cannot be executed


From: jenia.ivlev
Subject: [O] Babel introduction example cannot be executed
Date: Sun, 05 Oct 2014 01:19:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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.










reply via email to

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