emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] bug: orgtbl-to-tsv: premature end of table


From: Charles C. Berry
Subject: Re: [O] bug: orgtbl-to-tsv: premature end of table
Date: Wed, 22 Jul 2015 21:04:10 -0700
User-agent: Alpine 2.11 (OSX 23 2013-08-11)

On Wed, 22 Jul 2015, Nicolas Goaziou wrote:

Hello,

"Charles C. Berry" <address@hidden> writes:

Not a bug IMO.

Notwithstanding the R issue, I think trimming the output of a radio
table is a bit aggressive. We cannot know if trailing (and leading)
spaces are significant in the output format the user defined.

I removed the trimming part in commit
bf37cd09b128b4431e1dd1a538fbcc4be3615042.

Let me know if you disagree with that change.

I don't think the change broke anything that wasn't already broken.

And my diagnosis was wrong - I was confused by a problem that remains:

`org-babel-R-assign-elisp' is broken. Ragged rows in a table are filled with "" in each missing field; `org-table-to-lisp' returns a list of lists of common length.

`org-babel-R-assign-elisp' inspects that list to see if any element vary in length. But they do not, and therefore `max' and `min' in the let* varlist are equal and later on `ob-R-transfer-variable-table-with-header' is always used.

I think lom pik's example would not have failed had max and min differed as `ob-R-transfer-variable-table-without-header' would have been used instead.

R src blocks ought to render missing elements due to ragged rows in a table as NA, but this isnt the current behavior for this table:

#+NAME: tbl-ragged
| 1 | 2 | a |
| 8 | 9 |   |

It seems like the fix for this would be to prune any "" at the ends of lists in the value arg when beginning `org-babel-R-assign-elisp'.

But I am tired, so I'll defer trying this till another time.

Best,

Chuck



reply via email to

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