[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] :var problems with R
From: |
Neuwirth Erich |
Subject: |
Re: [O] :var problems with R |
Date: |
Thu, 21 Jun 2012 20:26:12 +0200 |
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.