emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain l


From: Ihor Radchenko
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: Thu, 08 Dec 2022 09:07:53 +0000

Jeremie Juste <jeremiejuste@gmail.com> writes:

> Many thanks to you all for your feedback.
> From 1ad16ffb9, I have restored the expected output in R. that is.
>
>
> #+NAME: example-list
> - simple
>   - not
>   - nested
> - list
>
> #+BEGIN_SRC R :var x=example-list
> x
> #+END_SRC
>
> #+RESULTS:
> | simple |
> | list   |

I am not sure if I like the approach you used in the commit.

-        (unless (listp (car value)) (setq value (list value)))
+        (unless (listp (car value)) (setq value (mapcar 'list value)))

In the above, you are transforming (val1 val2 val3 ...) list into
((val1) (val2) (val3) ...).

Does it make sense from the point of view of R code?
AFAIU, the current ob-R implementation converts lists into R tables,
which is not accurate? Would it make sense to convert Elisp lists into R
lists directly?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]