emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* SO question on dynamic arguments
@ 2012-02-09 19:01 Ken Williams
  2012-02-14 22:53 ` Andreas Leha
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Williams @ 2012-02-09 19:01 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

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.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SO question on dynamic arguments
  2012-02-09 19:01 SO question on dynamic arguments Ken Williams
@ 2012-02-14 22:53 ` Andreas Leha
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Leha @ 2012-02-14 22:53 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-14 22:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 19:01 SO question on dynamic arguments Ken Williams
2012-02-14 22:53 ` Andreas Leha

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).