From eabc823bee9bcb9c1643fa6eca52f9f9bb989707 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 11 May 2012 16:50:34 -0400 Subject: [PATCH] Can't assume every entry in a table is a sequence * lisp/ob-R.el (org-babel-R-assign-elisp): Can't assume every entry in a table is a sequence. --- lisp/ob-R.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 7802bab31..03c206bad 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -167,8 +167,10 @@ This function is called by `org-babel-execute-src-block'." (defun org-babel-R-assign-elisp (name value colnames-p rownames-p) "Construct R code assigning the elisp VALUE to a variable named NAME." (if (listp value) - (let ((max (apply #'max (mapcar #'length value))) - (min (apply #'min (mapcar #'length value))) + (let ((max (apply #'max (mapcar #'length (org-remove-if-not + #'sequencep value)))) + (min (apply #'min (mapcar #'length (org-remove-if-not + #'sequencep value)))) (transition-file (org-babel-temp-file "R-import-"))) ;; ensure VALUE has an orgtbl structure (depth of at least 2) (unless (listp (car value)) (setq value (list value)))