emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] simple variables as arguments to source block


From: Andreas Leha
Subject: Re: [O] simple variables as arguments to source block
Date: Tue, 07 May 2013 12:39:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Rasmus <address@hidden> writes:

> Andreas Leha <address@hidden> 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




reply via email to

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