emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: simple variables as arguments to source block
Date: Tue, 07 May 2013 12:33:53 +0200	[thread overview]
Message-ID: <87mws79izy.fsf@pank.eu> (raw)
In-Reply-To: 87k3nb883v.fsf@med.uni-goettingen.de

Andreas Leha <andreas.leha@med.uni-goettingen.de> 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 

-- 
This is the kind of tedious nonsense up with which I will not put

  reply	other threads:[~2013-05-07 10:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07  9:14 simple variables as arguments to source block Andreas Leha
2013-05-07 10:33 ` Rasmus [this message]
2013-05-07 10:39   ` Andreas Leha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mws79izy.fsf@pank.eu \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).