From: Neuwirth Erich <erich.neuwirth@univie.ac.at>
To: suvayu ali <fatkasuvayu+linux@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: :var problems with R
Date: Thu, 21 Jun 2012 20:26:12 +0200 [thread overview]
Message-ID: <18842B70-DFEE-4477-96CD-FD1058BA9BA5@univie.ac.at> (raw)
In-Reply-To: <CAMXnza2gUBON2G_79Cc842yDJ7R+af9OjASbC+B_w9LNsm_MFg@mail.gmail.com>
Meanwhile I learned that
#+name: xvar
: waterfall
#+name: myblock
#+begin_src R :var xxx=xvar
print(xxx)
#+end_src
#+RESULTS: myblock
: waterfall
ans so will
#+name: xvar2
: water
#+name: myblock2
#+begin_src R :var xxx=xvar2
xxx
#+end_src
#+RESULTS: myblock2
: water
The critical missing piece for me was the colon in front of the value in a name definition.
I wanted this because I am running a project on different machines, and I want to give the
name od subdirectories through this mechanism.
Ir seems cleaner than using code in a programming language when we just need constants.
And I explained the problem seems to be that a value returned by R in a named block is not accessible
as a named "variable".
In this case, I would rather stay with R which I need anyhow and I have to explain to my coworkers.
Using emacs-lisp additionally would just make things harder to understand fore some of the project members.
This also works now
#+name: rvar
#+begin_src R
"raha"
#+end_src
#+RESULTS: rvar
: raha
#+name: rvartest
#+begin_src R :var xxx=rvar
xxx
#+end_src
I had misunderstood something there.
next prev parent reply other threads:[~2012-06-21 18:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 6:14 :var problems with R Neuwirth Erich
2012-06-21 7:04 ` suvayu ali
2012-06-21 18:26 ` Neuwirth Erich [this message]
2012-06-21 16:02 ` Thomas S. Dye
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=18842B70-DFEE-4477-96CD-FD1058BA9BA5@univie.ac.at \
--to=erich.neuwirth@univie.ac.at \
--cc=emacs-orgmode@gnu.org \
--cc=fatkasuvayu+linux@gmail.com \
/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).