From mboxrd@z Thu Jan 1 00:00:00 1970 From: lom pik Subject: [BUG] orgtbl-to-tsv: premature end of table Date: Mon, 13 Jul 2015 15:21:23 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01493fb22a31f3051ac777ac Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEkED-0002F9-OF for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 16:21:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEkEA-0000l6-QO for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 16:21:29 -0400 Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:34464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEkEA-0000kS-Ij for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 16:21:26 -0400 Received: by lbbzr7 with SMTP id zr7so8682623lbb.1 for ; Mon, 13 Jul 2015 13:21:23 -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 --089e01493fb22a31f3051ac777ac Content-Type: text/plain; charset=UTF-8 Hi, -- this was only tested with the 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 --089e01493fb22a31f3051ac777ac Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

-- this was only test= ed with the git version

I was trying to export a table as a va= riable to R via babel evaluation. However it seems that is the rows are emp= ty , 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 |=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 value=C2=A0=C2=A0=C2=A0 ## won't work
print(df2)
#+E= ND_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 "\"1\"<tab>\"2\""

<= br>
#+NAME: tlb-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* :va= r 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&q= uot;" #1# #1# #1# 10) ) '(:fmt org-babel-R-quote-tsv-field))=C2=A0= -> "\"1\"<tab>\"2\"<tab><tab>= ;<tab><tab><tab>\"1\""



Emac= s 24.5 with Org-mode version 8.3beta (release_8.3beta-1286-g20795f.dirty )<= br>
Regards,
lompik

--089e01493fb22a31f3051ac777ac--