From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: SO question on dynamic arguments
Date: Tue, 14 Feb 2012 23:53:58 +0100 [thread overview]
Message-ID: <87r4xx10xl.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 21A5E1E970CD46459ECBE86D6CC4B28C53418407@spexch01.WindLogics.local
Ken Williams <Ken.Williams@windlogics.com> writes:
> I asked this question on Stack Overflow today, I wonder if someone
> might know the answer here:
>
>
>
>
> http://stackoverflow.com/questions/9215216/computing-argument-values-dynamically
>
>
>
> It’s about computing arguments to a “#+begin_src R” block based on
> previous R results.
>
>
>
> Thanks.
>
>
>
> --
>
> Ken Williams, Senior Research Scientist
>
> WindLogics
>
> http://windlogics.com
>
>
>
>
> ----------------------------------------------------------------------
> CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or distribution
> of any kind is strictly prohibited. If you are not the intended
> recipient, please contact the sender via reply e-mail and destroy all
> copies of the original message. Thank you.
Hi Ken,
I think you can not extract variables from underlying processes (like R)
in org.
What you can do in your example, however, is
(1) name the first source block
(2) call it with sbe
(3) do the calculation in emacs-lisp
which would look something like this:
,----[ example ]
| #+name: setheight
| #+begin_src R
| x <- 5
| #+end_src
|
| #+begin_src R :results graphics :file foo.svg :height (* 3 (string-to-int (sbe setheight)))
| plot(1:10)
| #+end_src
`----
Cheers,
Andreas
prev parent reply other threads:[~2012-02-14 22:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 19:01 SO question on dynamic arguments Ken Williams
2012-02-14 22:53 ` Andreas Leha [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4xx10xl.fsf@med.uni-goettingen.de \
--to=andreas.leha@med.uni-goettingen.de \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.