aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/org/ob-R.el
diff options
context:
space:
mode:
authorBastien Guerry2014-10-03 10:13:51 +0200
committerBastien Guerry2014-10-03 10:13:51 +0200
commita81e5de3a34d27cea43d49ffdfd9755f0eddb262 (patch)
tree94d0e2b93f054d2cc9f7f7dc5423561ea3c00a2c /lisp/org/ob-R.el
parente197284d4789d7caa613fc406516f58fbec02547 (diff)
downloademacs-a81e5de3a34d27cea43d49ffdfd9755f0eddb262.tar.gz
emacs-a81e5de3a34d27cea43d49ffdfd9755f0eddb262.zip
Sync with Org 8.2.8.
Diffstat (limited to 'lisp/org/ob-R.el')
-rw-r--r--lisp/org/ob-R.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el
index 93d6fe284f5..b97fd912eae 100644
--- a/lisp/org/ob-R.el
+++ b/lisp/org/ob-R.el
@@ -173,12 +173,11 @@ This function is called by `org-babel-execute-src-block'."
173(defun org-babel-R-assign-elisp (name value colnames-p rownames-p) 173(defun org-babel-R-assign-elisp (name value colnames-p rownames-p)
174 "Construct R code assigning the elisp VALUE to a variable named NAME." 174 "Construct R code assigning the elisp VALUE to a variable named NAME."
175 (if (listp value) 175 (if (listp value)
176 (let ((max (apply #'max (mapcar #'length (org-remove-if-not 176 (let* ((lengths (mapcar 'length (org-remove-if-not 'sequencep value)))
177 #'sequencep value)))) 177 (max (if lengths (apply 'max lengths) 0))
178 (min (apply #'min (mapcar #'length (org-remove-if-not 178 (min (if lengths (apply 'min lengths) 0))
179 #'sequencep value)))) 179 (transition-file (org-babel-temp-file "R-import-")))
180 (transition-file (org-babel-temp-file "R-import-"))) 180 ;; Ensure VALUE has an orgtbl structure (depth of at least 2).
181 ;; ensure VALUE has an orgtbl structure (depth of at least 2)
182 (unless (listp (car value)) (setq value (list value))) 181 (unless (listp (car value)) (setq value (list value)))
183 (with-temp-file transition-file 182 (with-temp-file transition-file
184 (insert 183 (insert