Hello,

Many thanks for the report.  I haven't seen this feature in the
documentation. Have i missed anything?
I would suspect as least R users to favor the column name directly in R,but
i don't see any issues implementing it if we are all going in this
direction.  Note also that errors are silent for elisp.
Should this be the expected behavior?

#+begin_src elisp :colnames '("Odd")
'((1 2) (3 4) (5 6))
#+end_src

#+RESULTS:
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |

#+begin_src elisp :colnames '("Odd" "even" "nil")
'((1 2) (3 4) (5 6))
#+end_src

#+RESULTS:
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |

Best regards,
Jeremie

On Sun, Mar 15, 2026 at 5:15 PM Ihor Radchenko <[email protected]> wrote:

> Ihor Radchenko <[email protected]> writes:
>
> >> With an R data frame, the result has the R colnames, not the ones from
> >> the Babel colnames header.
> >>
> >>   #+begin_src R :colnames '("Odd" "Even")
> >>     data.frame(a=c(1,3,5),
> >>                b=c(2,4,6))
> >>   #+end_src
> >>
> >>   #+RESULTS:
> >>   | a | b |
> >>   |---+---|
> >>   | 1 | 2 |
> >>   | 3 | 4 |
> >>   | 5 | 6 |
> >>
> >> Not unreasonable, since R data frames already provide colnames.
>
> Confirmed.
> Owned-by: [email protected]
>
> --
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> 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>
>


-- 
Jérémie Juste

Reply via email to