From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Witte Subject: Problem with Babel and sessions Date: Thu, 9 Sep 2010 17:09:56 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2119193320==" Return-path: Received: from [140.186.70.92] (port=59840 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtilG-0006EF-GK for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtilC-0000Jh-7L for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:10:02 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:56901) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtilC-0000JM-1a for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:09:58 -0400 Received: by bwz6 with SMTP id 6so1503679bwz.0 for ; Thu, 09 Sep 2010 08:09:56 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --===============2119193320== Content-Type: multipart/alternative; boundary=0016e6dd8e81e1f489048fd50564 --0016e6dd8e81e1f489048fd50564 Content-Type: text/plain; charset=ISO-8859-1 I'm having a bit of trouble with org bable and R. When I try to execute the code below (C-c C-c on the call line), as you can see, I get the results :nil --------------------------------------- #+tblname: tableTestBabel | 0 | 4.40 | | 30 | 4.54 | | 60 | 7.09 | | 90 | 9.40 | | 120 | 9.22 | | 150 | 6.65 | | 180 | 4.22 | #+srcname: chartPolAngle(pol) #+begin_src R angle <- pol[,1] energy <- pol[,2] plot(angle,energy) energy.model <- nls (energy ~ a1 + a2 * (sin(pi / a3 *(angle-a4)))^2, start=list(a1=3.0, a2=7.0, a3=180, a4=0.0)) lines(spline(angle, fitted.values(energy.model)), lwd=2) summary(energy.model) #+end_src #+call: chartPolAngle(pol=tableTestBabel) :session testBabel:file testBabel.pdf #+results: chartPolAngle(pol=tableTestBabel) : nil ------------------------------------ but If I move the header arguments to the source block, as in the code below, everything works fine. I also get asked "ESS [S(R): R] starting data directory? ~/doc/org/" which I don't get with the code above. --------------------------------------- #+tblname: tableTestBabel | 0 | 4.40 | | 30 | 4.54 | | 60 | 7.09 | | 90 | 9.40 | | 120 | 9.22 | | 150 | 6.65 | | 180 | 4.22 | #+call: chartPolAngle(pol=tableTestBabel) #+results: chartPolAngle(pol=tableTestBabel) : testBabel.pdf #+srcname: chartPolAngle(pol) #+begin_src R :session testBabel :file testBabel.pdf angle <- pol[,1] energy <- pol[,2] plot(angle,energy) energy.model <- nls (energy ~ a1 + a2 * (sin(pi / a3 *(angle-a4)))^2, start=list(a1=3.0, a2=7.0, a3=180, a4=0.0)) lines(spline(angle, fitted.values(energy.model)), lwd=2) summary(energy.model) #+end_src --------------------------------------- Org doesn't appear to respect the head arguments on the call. I pulled from git a couple days ago. Any ideas why? Cheers Chris Witte --0016e6dd8e81e1f489048fd50564 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm having a bit of trouble with org bable and R. When I try to execute= the code below (C-c C-c on the call line), as you can see, I get the resul= ts :nil

---------------------------------------
#+tblname: tableT= estBabel
|=A0=A0 0 | 4.40 |
|=A0 30 | 4.54 |
|=A0 60 | 7.09 |
|=A0 90 | 9.4= 0 |
| 120 | 9.22 |
| 150 | 6.65 |
| 180 | 4.22 |

#+srcname= : chartPolAngle(pol)
#+begin_src R
=A0 angle <- pol[,1]
=A0 ene= rgy <- pol[,2]
=A0 plot(angle,energy)
=A0 energy.model <-=A0 nls (energy ~ a1 + a2 *= (sin(pi / a3 *(angle-a4)))^2, start=3Dlist(a1=3D3.0, a2=3D7.0, a3=3D180, a= 4=3D0.0))
=A0 lines(spline(angle, fitted.values(energy.model)), lwd=3D2)=
=A0 summary(energy.model)
#+end_src

#+call: chartPolAngle(pol=3DtableTestBabel) :session testBabel:file testBab= el.pdf

#+results: chartPolAngle(pol=3DtableTestBabel)
: nil
------------------------------------

but If I move the header argume= nts to the source block, as in the code below, everything works fine. I als= o get asked "ESS [S(R): R] starting data directory? ~/doc/org/" w= hich I don't get with the code above.

---------------------------------------
#+tblname: tableTestBabel|=A0=A0 0 | 4.40 |
|=A0 30 | 4.54 |
|=A0 60 | 7.09 |
|=A0 90 | 9.= 40 |
| 120 | 9.22 |
| 150 | 6.65 |
| 180 | 4.22 |

#+call: = chartPolAngle(pol=3DtableTestBabel)

#+results: chartPolAngle(pol=3DtableTestBabel)
: testBabel.pdf

#+srcname: chartPolAngle(pol)
#+begin_src R :session testBabel :fi= le testBabel.pdf
=A0 angle <- pol[,1]
=A0 energy <- pol[,2]
= =A0 plot(angle,energy)
=A0 energy.model <-=A0 nls (energy ~ a1 + a2 * (sin(pi / a3 *(angle-a4))= )^2, start=3Dlist(a1=3D3.0, a2=3D7.0, a3=3D180, a4=3D0.0))
=A0 lines(spl= ine(angle, fitted.values(energy.model)), lwd=3D2)
=A0 summary(energy.mod= el)
#+end_src
---------------------------------------

Org doesn't appear to re= spect the head arguments on the call. I pulled from git a couple days ago. = Any ideas why?

Cheers
Chris Witte
--0016e6dd8e81e1f489048fd50564-- --===============2119193320== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============2119193320==--