fix bug in R session evaluation
authorEric Schulte <schulte.eric@gmail.com>
Wed, 21 Sep 2011 12:52:20 +0000 (06:52 -0600)
committerEric Schulte <schulte.eric@gmail.com>
Wed, 21 Sep 2011 15:10:21 +0000 (09:10 -0600)
* lisp/ob-R.el (org-babel-R-evaluate): Fix bug in R session
  evaluation.

lisp/ob-R.el

index f99664e..79cc0be 100644 (file)
@@ -234,10 +234,11 @@ current code buffer."
 (defun org-babel-R-evaluate
   (session body result-type result-params column-names-p row-names-p)
   "Evaluate R code in BODY."
-  (funcall (if session
-              #'org-babel-R-evaluate-session
-            #'org-babel-R-evaluate-external-process)
-          body result-type result-params column-names-p row-names-p))
+  (if session
+      (org-babel-R-evaluate-session
+       session body result-type result-params column-names-p row-names-p)
+    (org-babel-R-evaluate-external-process
+     body result-type result-params column-names-p row-names-p)))
 
 (defun org-babel-R-evaluate-external-process
   (body result-type result-params column-names-p row-names-p)