From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Williams Subject: SO question on dynamic arguments Date: Thu, 9 Feb 2012 13:01:10 -0600 Message-ID: <21A5E1E970CD46459ECBE86D6CC4B28C53418407@spexch01.WindLogics.local> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_21A5E1E970CD46459ECBE86D6CC4B28C53418407spexch01WindLog_" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvZFF-0007uK-Si for emacs-orgmode@gnu.org; Thu, 09 Feb 2012 14:01:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvZF2-0001mj-7J for emacs-orgmode@gnu.org; Thu, 09 Feb 2012 14:01:25 -0500 Received: from shrimp.windlogics.com ([216.245.170.164]:25744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvZF1-0001lL-Tm for emacs-orgmode@gnu.org; Thu, 09 Feb 2012 14:01:12 -0500 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" --_000_21A5E1E970CD46459ECBE86D6CC4B28C53418407spexch01WindLog_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I asked this question on Stack Overflow today, I wonder if someone might kn= ow the answer here: http://stackoverflow.com/questions/9215216/computing-argument-values-dyna= mically 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 inte= nded recipient(s) and may contain confidential and privileged information. = Any unauthorized review, use, disclosure or distribution of any kind is str= ictly prohibited. If you are not the intended recipient, please contact the= sender via reply e-mail and destroy all copies of the original message. Th= ank you. --_000_21A5E1E970CD46459ECBE86D6CC4B28C53418407spexch01WindLog_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I asked this question on Stack Overflow today, I won= der if someone might know the answer here:

 

  http://stackoverflow.com/questions/9215216/computing-argument-values-dynami= cally

 

It’s about computing arguments to a “#&#= 43;begin_src R” block based on previous R results.

 

Thanks.

 

--

Ken Williams, Senior Research Scientist

Wind<= /b>Logics

http://windlogics.com

 



CONFIDENTIALITY NOTICE: Th= is e-mail message is for the sole use of the intended recipient(s) and may = contain confidential and privileged information. Any unauthorized review, u= se, 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.
--_000_21A5E1E970CD46459ECBE86D6CC4B28C53418407spexch01WindLog_-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: SO question on dynamic arguments Date: Tue, 14 Feb 2012 23:53:58 +0100 Message-ID: <87r4xx10xl.fsf@med.uni-goettingen.de> References: <21A5E1E970CD46459ECBE86D6CC4B28C53418407@spexch01.WindLogics.local> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxRGX-0007Zf-LW for emacs-orgmode@gnu.org; Tue, 14 Feb 2012 17:54:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxRGW-00027O-EJ for emacs-orgmode@gnu.org; Tue, 14 Feb 2012 17:54:29 -0500 Received: from plane.gmane.org ([80.91.229.3]:44004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxRGW-00027D-7W for emacs-orgmode@gnu.org; Tue, 14 Feb 2012 17:54:28 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RxRGU-0002ws-8X for emacs-orgmode@gnu.org; Tue, 14 Feb 2012 23:54:26 +0100 Received: from vpn-2205.gwdg.de ([134.76.2.205]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 23:54:26 +0100 Received: from andreas.leha by vpn-2205.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 23:54:26 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Ken Williams 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