emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] SO question on dynamic arguments


From: Andreas Leha
Subject: Re: [O] SO question on dynamic arguments
Date: Tue, 14 Feb 2012 23:53:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Ken Williams <address@hidden> 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




reply via email to

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