aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/org/ob-R.el
diff options
context:
space:
mode:
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