From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neuwirth Erich Subject: Re: :var problems with R Date: Thu, 21 Jun 2012 20:26:12 +0200 Message-ID: <18842B70-DFEE-4477-96CD-FD1058BA9BA5@univie.ac.at> References: Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Shm5B-00016b-UJ for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 14:26:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Shm5A-0006jZ-57 for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 14:26:17 -0400 Received: from grace.univie.ac.at ([131.130.3.115]:57334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Shm59-0006jF-RH for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 14:26:16 -0400 In-Reply-To: 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: suvayu ali Cc: emacs-orgmode@gnu.org Meanwhile I learned that #+name: xvar : waterfall #+name: myblock #+begin_src R :var xxx=3Dxvar print(xxx) #+end_src #+RESULTS: myblock : waterfall ans so will #+name: xvar2 : water #+name: myblock2 #+begin_src R :var xxx=3Dxvar2 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=3Drvar xxx #+end_src I had misunderstood something there.