emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with Babel and sessions
@ 2010-09-09 15:09 Christopher Witte
  2010-09-10 18:06 ` Proposed New Syntax For Calling Code Blocks was: " Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Witte @ 2010-09-09 15:09 UTC (permalink / raw)
  To: Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 1828 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2079 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-18 12:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09 15:09 Problem with Babel and sessions Christopher Witte
2010-09-10 18:06 ` Proposed New Syntax For Calling Code Blocks was: " Eric Schulte
2010-09-10 19:58   ` Proposed New Syntax For Calling Code Blocks was Jambunathan K
2010-09-10 21:12     ` Jambunathan K
2010-09-13 12:05   ` Proposed New Syntax For Calling Code Blocks was: Problem with Babel and sessions Christopher Witte
2010-09-18 12:24     ` Eric Schulte
2010-09-14 19:03   ` Sébastien Vauban

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).