From mboxrd@z Thu Jan 1 00:00:00 1970 From: jenia mtl Subject: Can't execute the introductory code: take table as input to produce mean Date: Tue, 5 Aug 2014 02:48:50 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d4f968b738a04ffdc3fb8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEYYH-0001ll-Ts for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 02:48:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEYYG-0002RO-MY for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 02:48:53 -0400 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:40323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEYYG-0002R6-Cy for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 02:48:52 -0400 Received: by mail-wi0-f178.google.com with SMTP id hi2so702964wib.17 for ; Mon, 04 Aug 2014 23:48:50 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --047d7b5d4f968b738a04ffdc3fb8 Content-Type: text/plain; charset=UTF-8 Hello: I want to learn babel-mode so I'm going through http://orgmode.org/worg/org-contrib/babel/intro.html#source-code-blocks-org. I'm trying to execute the basic tutorial's script and for some reason can't do it. I'm suppose to feed a table as input to a function. This is the table: #+name: tbl-example-data() #+begin_src R runif(n=5, min=0, max=1) #+end_src #+RESULTS: tbl-example-data | 0.607781215803698 | | 0.157157169422135 | | 0.675619817571715 | | 0.0488600700628012 | | 0.998780139256269 | The next function is the function to be executed: #+name: R-mean(x) #+begin_src R mean(x) #+end_src When I try to run it by pressing `C-c C-c` I get `variable "x" in block "R-mean" must be assigned a default value`. I tried to explicitly run the function R-mean(x) like so. #+call: R-mean(tbl-example-data) Unfortunately I get Reference 'R-mean' not found in this buffer How do I run the function R-mean using the vlaues from tbl-example-data? Thanks in advance. Jenia --047d7b5d4f968b738a04ffdc3fb8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello:

I want to learn babel-mode so I= 9;m going through http://orgmode.org/worg/org-contrib/babel/in= tro.html#source-code-blocks-org.

I'm trying to execute the basic tutorial's script and for some = reason can't do it.

I'm suppose to feed a table as input to = a function. This is the table:

=C2=A0=C2=A0=C2=A0 #+name: tbl-exampl= e-data()
=C2=A0=C2=A0=C2=A0 #+begin_src R
=C2=A0=C2=A0=C2=A0 runif(n=3D5, min=3D= 0, max=3D1)
=C2=A0=C2=A0=C2=A0 #+end_src

=C2=A0=C2=A0=C2=A0 #+RES= ULTS: tbl-example-data
=C2=A0=C2=A0=C2=A0 |=C2=A0 0.607781215803698 | =C2=A0=C2=A0=C2=A0 |=C2=A0 0.157157169422135 |
=C2=A0=C2=A0=C2=A0 |=C2= =A0 0.675619817571715 |
=C2=A0=C2=A0=C2=A0 | 0.0488600700628012 |
=C2=A0=C2=A0=C2=A0 |=C2=A0 0.998780139256269 |

The next function is = the function to be executed:


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

When I try to run it by pressing `C-c C-c`=
I get `variable "x" in block "R-mean" must be assigned = a default value`.


I tried to explicitly run the function R-mean(= x) like so.

=C2=A0=C2=A0=C2=A0 #+call: R-mean(tbl-example-data)
<= br>Unfortunately I get

=C2=A0=C2=A0=C2=A0 Reference 'R-mean' not found in this buffer<= br>

How do I run the function R-mean using the vlaues from tbl-examp= le-data?

Thanks in advance.

Jenia
--047d7b5d4f968b738a04ffdc3fb8--