emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: jenia mtl <jenia.ivlev@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Can't execute the introductory code: take table as input to produce mean
Date: Tue, 5 Aug 2014 02:48:50 -0400	[thread overview]
Message-ID: <CAJO5WKvfYyQ8ybU0NnWWM-gYt_uU+BFA-kunry8gPNfpt6N2cA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1443 bytes --]

             reply	other threads:[~2014-08-05  6:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05  6:48 jenia mtl [this message]
2014-08-05  9:52 ` Can't execute the introductory code: take table as input to produce mean Sebastien Vauban
  -- strict thread matches above, loose matches on Subject: below --
2014-08-06  6:08 jenia.ivlev
2014-08-06 14:14 ` Sebastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJO5WKvfYyQ8ybU0NnWWM-gYt_uU+BFA-kunry8gPNfpt6N2cA@mail.gmail.com \
    --to=jenia.ivlev@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).