From: Greg Minshall <minshall@umich.edu>
To: "Johan Tolö" <johan@toloe.se>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]
Date: Sun, 04 Dec 2022 18:43:08 -0800 [thread overview]
Message-ID: <765038.1670208188@archlinux> (raw)
In-Reply-To: <87wn77mdvk.fsf@toloe.se>
i see this same behavior. to me, (org-babel-R-assign-elisp) seems to be
the problem, but it hasn't changed any time recently. (nor, if my =git
blame= is done correctly, has anything else in ob-R.el.)
i don't understand how (org-babel-R-assign-elisp) thinks. it seems to
assign =max= and =min= assuming that =value= is a list of (at least one)
list(s).
this *might* be a fix. but, i don't have a lot of confidence it will
not have bad side effects for other cases. (though i tested it with a
simple list, and a simple table with more than one row, and a list of
two lists, the first of length 3, the second of length 2.):
----
modified lisp/ob-R.el
@@ -241,7 +241,7 @@ 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* ((lengths (mapcar 'length (cl-remove-if-not 'sequencep value)))
+ (let* ((lengths (mapcar 'length (cl-remove-if-not 'listp value)))
(max (if lengths (apply 'max lengths) 0))
(min (if lengths (apply 'min lengths) 0)))
;; Ensure VALUE has an orgtbl structure (depth of at least 2).
----
next prev parent reply other threads:[~2022-12-05 2:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-04 14:34 [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)] Johan Tolö
2022-12-05 2:43 ` Greg Minshall [this message]
2022-12-05 10:29 ` Johan Tolö
2022-12-05 11:21 ` Jérémie Juste
2022-12-05 18:57 ` Berry, Charles
2022-12-06 0:41 ` Greg Minshall
2022-12-06 4:31 ` Berry, Charles
2022-12-06 6:52 ` Greg Minshall
2022-12-05 2:49 ` Greg Minshall
2022-12-06 22:11 ` Jeremie Juste
2022-12-07 1:31 ` Greg Minshall
2022-12-07 1:53 ` William Denton
2022-12-07 12:16 ` Ihor Radchenko
2022-12-07 21:08 ` Jeremie Juste
2022-12-08 9:07 ` Ihor Radchenko
2022-12-08 12:42 ` Greg Minshall
2022-12-08 12:51 ` Ihor Radchenko
2022-12-08 13:33 ` Greg Minshall
2022-12-10 12:31 ` Johan Tolö
2022-12-11 8:51 ` [FR] Allow passing nested list structures to variables in src blocks (was: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]) Ihor Radchenko
2022-12-11 15:31 ` [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)] Jeremie Juste
2022-12-12 9:47 ` Ihor Radchenko
2022-12-12 12:17 ` Greg Minshall
2022-12-12 12:27 ` Ihor Radchenko
2022-12-13 13:29 ` Johan Tolö
2022-12-14 2:53 ` Greg Minshall
2022-12-15 8:51 ` Johan Tolö
2022-12-15 17:50 ` Greg Minshall
2022-12-29 16:00 ` Bastien Guerry
2022-12-29 23:52 ` Berry, Charles
2022-12-30 9:25 ` Bastien
2022-12-31 12:42 ` Ihor Radchenko
2022-12-30 9:24 ` Bastien Guerry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=765038.1670208188@archlinux \
--to=minshall@umich.edu \
--cc=emacs-orgmode@gnu.org \
--cc=johan@toloe.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.