Ken Williams ken.willi...@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