From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: simple variables as arguments to source block Date: Tue, 07 May 2013 12:39:57 +0200 Message-ID: <87fvxz845e.fsf@med.uni-goettingen.de> References: <87k3nb883v.fsf@med.uni-goettingen.de> <87mws79izy.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZfJj-0001fb-Qx for emacs-orgmode@gnu.org; Tue, 07 May 2013 06:40:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZfJi-0004kn-DG for emacs-orgmode@gnu.org; Tue, 07 May 2013 06:40:19 -0400 Received: from plane.gmane.org ([80.91.229.3]:55868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZfJi-0004ki-6a for emacs-orgmode@gnu.org; Tue, 07 May 2013 06:40:18 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UZfJd-00052d-Md for emacs-orgmode@gnu.org; Tue, 07 May 2013 12:40:13 +0200 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 May 2013 12:40:13 +0200 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 May 2013 12:40:13 +0200 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 Rasmus writes: > Andreas Leha writes: > >> Hi all, >> >> I'd like to pass a string to a source block -- not directly, though, but >> through a reference. What is the recommended way to do this? >> >> This is what I gather from the manual: >> >> --8<---------------cut here---------------start------------->8--- >> #+name: myvar >> | aaa | >> >> #+begin_src R test :var myvar=myvar[0,0] >> print(myvar) >> #+end_src >> --8<---------------cut here---------------end--------------->8--- >> My question is: How can I get rid of the [0,0]? > > How about: > > #+BEGIN_SRC Org > #+NAME: myvar > : 4 > > #+BEGIN_SRC R :var x=myvar > x > #+END_SRC > > #+RESULTS: > : 4 > #+END_SRC Works, indeed. Thanks. Andreas