From mboxrd@z Thu Jan 1 00:00:00 1970 From: lom pik Subject: bug: orgtbl-to-tsv: premature end of table Date: Tue, 14 Jul 2015 16:26:48 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2354cedeef6051adc7e6f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF7j1-000428-Bt for emacs-orgmode@gnu.org; Tue, 14 Jul 2015 17:26:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZF7j0-0008Ua-Bc for emacs-orgmode@gnu.org; Tue, 14 Jul 2015 17:26:51 -0400 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:34537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF7j0-0008Tw-2T for emacs-orgmode@gnu.org; Tue, 14 Jul 2015 17:26:50 -0400 Received: by lbbzr7 with SMTP id zr7so13781540lbb.1 for ; Tue, 14 Jul 2015 14:26:48 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a11c2354cedeef6051adc7e6f Content-Type: text/plain; charset=UTF-8 Hi, -- this was only tested with the current git version I was trying to export a table as a variable to R via babel evaluation. However it seems that is the rows are empty , the exported table ends at the last non-empty value. For example,the second row of tbl-issue defined below ends with 2 columns [8,9]. The next table however works ok. I've narrowed down the cause to the orgtbl-to-tsv function as highlighted below. #+NAME: tbl-issue | 1 | 2 | 3 | 5 | 6 | 7 | | 8 | 9 | | | | | #+BEGIN_SRC R :session *R* :var df2=tbl-issue :results value ## won't work print(df2) #+END_SRC (orgtbl-to-tsv '( (1 2 #1="" #1# #1# #1# ) ) '(:fmt org-babel-R-quote-tsv-field)) -> "\"1\"\"2\"" #+NAME: tlb-ok | 1 | 2 | 3 | 5 | 6 | 7 | | 8 | 9 | | | | 10 | #+BEGIN_SRC R :session *R* :var df2=tbl-ok :results value # work ok print(df2) #+END_SRC (orgtbl-to-tsv '( (1 2 #1="" #1# #1# #1# 10) ) '(:fmt org-babel-R-quote-tsv-field)) -> "\"1\"\"2\"\"1\"" Emacs 24.5 with Org-mode version 8.3beta (release_8.3beta-1286-g20795f.dirty ) Regards, lompik --001a11c2354cedeef6051adc7e6f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


<= div>
Hi,

-- this was only tested with the current git= version

I was trying to export a table as a variable to R via= babel evaluation. However it seems that is the rows are empty , the export= ed table ends at the last non-empty value.

For example,the se= cond row of tbl-issue defined below ends with 2 columns [8,9]. The next tab= le however works ok. I've narrowed down the cause to the orgtbl-to-tsv = function as highlighted below.

#+NAME: tbl-issue
| 1 | 2 | 3 | 5 = | 6 | 7 |
| 8 | 9 |=C2=A0=C2=A0 |=C2=A0=C2=A0 |=C2=A0=C2=A0 |=C2=A0=C2= =A0 |
#+BEGIN_SRC R :session *R* :var df2=3Dtbl-issue=C2=A0 :results val= ue=C2=A0=C2=A0=C2=A0 ## won't work
print(df2)
#+END_SRC

=C2=A0(orgtbl-to-tsv '( (1 2 #1=3D"" #1# #1# #1# ) )= '(:fmt org-babel-R-quote-tsv-field))=C2=A0=C2=A0 ->=C2=A0=C2=A0 &qu= ot;\"1\"<tab>\"2\""



#+NAME: t= lb-ok
| 1 | 2 | 3 | 5 | 6 | 7 |
| 8 | 9 |=C2=A0=C2=A0 |=C2=A0=C2=A0 |= =C2=A0=C2=A0 | 10=C2=A0 |
#+BEGIN_SRC R :session *R* :var df2=3Dtbl-ok= =C2=A0 :results value=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # work ok
print(df2)=
#+END_SRC

=C2=A0(orgtbl-to-tsv '( (1 2 #1=3D"" #1#= #1# #1# 10) ) '(:fmt org-babel-R-quote-tsv-field))=C2=A0 -> "\= "1\"<tab>\"2\"<tab><tab><tab>&l= t;tab><tab>\"1\""



Emacs 24.5 with Or= g-mode version 8.3beta (release_8.3beta-1286-g20795f.dirty )

<= div>Regards,
lompik


--001a11c2354cedeef6051adc7e6f--