From: "Blanchette, Marco" <MAB@stowers.org>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Problem whit with code evaluation
Date: Wed, 18 Aug 2010 19:12:33 -0500 [thread overview]
Message-ID: <C891E121.2DF02%MAB@Stowers.org> (raw)
Sorry again if this is common knowledge, but the road to orgmode power user
is seeded with challenges!
I am trying to write an R function that would take 3 arguments, hopefully
set up in an org table and have a function run every rows, taking every
column as arguments to produce a set of report files... But I am going a bit
ahead of myself as I am stuck quite early in the development...
My problem is quite basic. For some reason, I can¹t seems to be able to
execute the following lines in the org buffer using org-babel-execute-buffer
or to export an html of the files. The code block just don't execute and
return errors.
* Examples take from
[[http://orgmode.org/worg/org-contrib/babel/intro.php#sec-7]]
* The python example
#+source: square(x)
#+begin_src python
x*x
#+end_src
#+call: square(x=6)
* The elisp example of the fibonacci series using a table as argument
#+tblname: fibonacci-inputs
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 |
#+srcname: fibonacci-seq(fib-inputs=fibonacci-inputs)
#+begin_src emacs-lisp
(defun fibonacci (n)
(if (or (= n 0) (= n 1))
n
(+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
(mapcar (lambda (row)
(mapcar #'fibonacci row)) fib-inputs)
#+end_src
* Then my own trial in R
#+srcname: test(x y)
#+begin_src R
p <- x*y
#+end_src
#+call test(x=4 y=9)
#+function test(x=3 y=8)
Is there something I am missing?
My current setup is:
GNU Emacs 23.1.50.1
org-mode (v7.01g)
R v2.11.1
XServer running Snow Leopard Server 10.6.4
Thanks for the help
--
Marco Blanchette, Ph.D.
Assistant Investigator
Stowers Institute for Medical Research
1000 East 50th St.
Kansas City, MO 64110
Tel: 816-926-4071
Cell: 816-726-8419
Fax: 816-926-2018
next reply other threads:[~2010-08-19 0:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 0:12 Blanchette, Marco [this message]
2010-08-19 2:37 ` Problem whit with code evaluation Dan Davison
2010-08-19 3:01 ` Blanchette, Marco
2010-08-19 4:23 ` Dan Davison
2010-08-19 5:05 ` Nick Dokos
2010-08-19 13:38 ` Dan Davison
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=C891E121.2DF02%MAB@Stowers.org \
--to=mab@stowers.org \
--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).