diff options
Diffstat (limited to 'lisp/org/ob-R.el')
| -rw-r--r-- | lisp/org/ob-R.el | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el index 81d628e4206..1f4fd87b0a3 100644 --- a/lisp/org/ob-R.el +++ b/lisp/org/ob-R.el | |||
| @@ -2,11 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte, Dan Davison |
| 6 | ;; Dan Davison | ||
| 7 | ;; Keywords: literate programming, reproducible research, R, statistics | 6 | ;; Keywords: literate programming, reproducible research, R, statistics |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 12 | 11 | ||
| @@ -277,16 +276,18 @@ last statement in BODY, as elisp." | |||
| 277 | (butlast | 276 | (butlast |
| 278 | (delq nil | 277 | (delq nil |
| 279 | (mapcar | 278 | (mapcar |
| 280 | (lambda (line) ;; cleanup extra prompts left in output | 279 | (lambda (line) (when (> (length line) 0) line)) |
| 281 | (if (string-match | 280 | (mapcar |
| 282 | "^\\([ ]*[>+][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) | 281 | (lambda (line) ;; cleanup extra prompts left in output |
| 283 | (substring line (match-end 1)) | 282 | (if (string-match |
| 284 | line)) | 283 | "^\\([ ]*[>+][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) |
| 285 | (org-babel-comint-with-output (session org-babel-R-eoe-output) | 284 | (substring line (match-end 1)) |
| 286 | (insert (mapconcat #'org-babel-chomp | 285 | line)) |
| 287 | (list body org-babel-R-eoe-indicator) | 286 | (org-babel-comint-with-output (session org-babel-R-eoe-output) |
| 288 | "\n")) | 287 | (insert (mapconcat #'org-babel-chomp |
| 289 | (inferior-ess-send-input)))) 2) "\n")))) | 288 | (list body org-babel-R-eoe-indicator) |
| 289 | "\n")) | ||
| 290 | (inferior-ess-send-input)))))) "\n")))) | ||
| 290 | 291 | ||
| 291 | (defun org-babel-R-process-value-result (result column-names-p) | 292 | (defun org-babel-R-process-value-result (result column-names-p) |
| 292 | "R-specific processing of return value. | 293 | "R-specific processing of return value. |