emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix R table import
@ 2015-01-04  5:00 Michael Gauland
  2015-01-04  6:24 ` Aaron Ecay
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Gauland @ 2015-01-04  5:00 UTC (permalink / raw)
  To: emacs-orgmode

ob-R.el: Fix R table import

* ob-R.el (ob-R-transfer-variable-table-with-header): Change separator from
tab to whitespace when reading in a table as a variable.

TINYCHANGE


 lisp/ob-R.el |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 2470b4f..80b7161 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -108,7 +108,7 @@ this variable.")
        con,
        header    = %s,
        row.names = %s,
-       sep       = \"\\t\",
+       sep       = \"\",
        as.is     = TRUE
      )
      close(con)
-- 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix R table import
  2015-01-04  5:00 [PATCH] Fix R table import Michael Gauland
@ 2015-01-04  6:24 ` Aaron Ecay
  2015-01-04 10:05   ` Andreas Leha
  2015-01-04 19:20   ` Michael Gauland
  0 siblings, 2 replies; 7+ messages in thread
From: Aaron Ecay @ 2015-01-04  6:24 UTC (permalink / raw)
  To: Michael Gauland; +Cc: Org-mode

Hi Michael,

Thanks for this patch.  Before it is applied, though, I would like to
understand why it is necessary.  Vikas said that he could not reproduce
the problem you originally reported.  (Here is a web archived version of
Vikas’s message, in case you did not see it at first:
<http://mid.gmane.org/B874ADA0-1879-4021-B873-035AC85C4F47@agrarianresearch.org>)

I cannot reproduce the problem either, using a very recent git version
of org.

I think we need some more information in order to understand why you are
experiencing this misbehavior.  Can you tell us what version of org you
have installed, i.e. the output of M-x org-version?

Thanks,

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix R table import
  2015-01-04  6:24 ` Aaron Ecay
@ 2015-01-04 10:05   ` Andreas Leha
  2015-01-04 19:20   ` Michael Gauland
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Leha @ 2015-01-04 10:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi Aaron,

Aaron Ecay <aaronecay@gmail.com> writes:
> Hi Michael,
>
> Thanks for this patch.  Before it is applied, though, I would like to
> understand why it is necessary.  Vikas said that he could not reproduce
> the problem you originally reported.  (Here is a web archived version of
> Vikas’s message, in case you did not see it at first:
> <http://mid.gmane.org/B874ADA0-1879-4021-B873-035AC85C4F47@agrarianresearch.org>)
>
> I cannot reproduce the problem either, using a very recent git version
> of org.
>
> I think we need some more information in order to understand why you are
> experiencing this misbehavior.  Can you tell us what version of org you
> have installed, i.e. the output of M-x org-version?
>

As I was involved in the thread you linked to as well, let me add that
I cannot (in some sense) reproduce it either.  But see my reply on the other
thread (http://permalink.gmane.org/gmane.emacs.orgmode/93778).

Regards,
Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix R table import
  2015-01-04  6:24 ` Aaron Ecay
  2015-01-04 10:05   ` Andreas Leha
@ 2015-01-04 19:20   ` Michael Gauland
  2015-01-05  0:35     ` Aaron Ecay
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Gauland @ 2015-01-04 19:20 UTC (permalink / raw)
  To: Michael Gauland, Org-mode

I'm using the latest from git, with some unrelated local modifications
(though to be sure I did a clean build from origin/master and had the
same problem).  Versions:

    Org-mode version 8.3beta (release_8.3beta-758-g034d00.dirty @
/usr/local/share/emacs/site-lisp/org/)

    GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of
2014-03-08 on lamiak, modified by Debian

    R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"


This is an Ubuntu system; my Debian system is pretty much the same,
and also shows the problem. Does this help?

On Sun, Jan 4, 2015 at 7:24 PM, Aaron Ecay <aaronecay@gmail.com> wrote:
> Hi Michael,
>
> Thanks for this patch.  Before it is applied, though, I would like to
> understand why it is necessary.  Vikas said that he could not reproduce
> the problem you originally reported.  (Here is a web archived version of
> Vikas’s message, in case you did not see it at first:
> <http://mid.gmane.org/B874ADA0-1879-4021-B873-035AC85C4F47@agrarianresearch.org>)
>
> I cannot reproduce the problem either, using a very recent git version
> of org.
>
> I think we need some more information in order to understand why you are
> experiencing this misbehavior.  Can you tell us what version of org you
> have installed, i.e. the output of M-x org-version?
>
> Thanks,
>
> --
> Aaron Ecay

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix R table import
  2015-01-04 19:20   ` Michael Gauland
@ 2015-01-05  0:35     ` Aaron Ecay
  2015-01-05  1:54       ` Michael Gauland
  0 siblings, 1 reply; 7+ messages in thread
From: Aaron Ecay @ 2015-01-05  0:35 UTC (permalink / raw)
  To: Michael Gauland

[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]

Hi Michael,

Hmm.  I have

Org-mode version 8.3beta (release_8.3beta-695-g390015 @ /home/aecay/development/org-mode/lisp/)

The git sha 034d00 from your org-version isn’t in my checkout.  Yours
also thinks it’s 60ish commits ahead of where mine is (758 vs. 695).
This is very strange; I don’t know what to make of it.

I have:

GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.6)

What is your version of ESS?  (C-h v ess-version)  It’s 14.11 for me
(actually a melpa install of the latest git version).

I executed the attached elisp file, then loaded the attached org file,
and could not reproduce the issue.  When doing so, the code that org
executes is echoed to the *R* buffer.  Can you send what is echoed for
you?  (You will have to edit in the appropriate paths to your org and
ess installations, unless they are in emacs’s default load-path)

I get:

data.table <- local({
     con <- textConnection(
       "\"A\"	\"B\"	\"C\"
\"115\"	\"76\"	\"60\""
     )
     res <- utils::read.table(
       con,
       header    = TRUE,
       row.names = NULL,
       sep       = "\t",
       as.is     = TRUE
     )
     close(con)
     res
   })
data.table
'org_babel_R_eoe'


[-- Attachment #2: r-table.el --]
[-- Type: application/emacs-lisp, Size: 363 bytes --]

[-- Attachment #3: r-table.org --]
[-- Type: application/vnd.lotus-organizer, Size: 207 bytes --]

[-- Attachment #4: Type: text/plain, Size: 25 bytes --]


Thanks,

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix R table import
  2015-01-05  0:35     ` Aaron Ecay
@ 2015-01-05  1:54       ` Michael Gauland
  2015-01-06  4:33         ` Aaron Ecay
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Gauland @ 2015-01-05  1:54 UTC (permalink / raw)
  To: Michael Gauland, Org-mode

My git has so many more commits because I'm sloppy about my local changes.

I had been using ESS 5.14 (from ELPA). When I switched to the latest
git version, the problem (at least seems to have) went away.

For my needs, I don't think this needs any further investigation,
though I'm happy to help if anyone else thinks it is important.

On Mon, Jan 5, 2015 at 1:35 PM, Aaron Ecay <aaronecay@gmail.com> wrote:
> Hi Michael,
>
> Hmm.  I have
>
> Org-mode version 8.3beta (release_8.3beta-695-g390015 @ /home/aecay/development/org-mode/lisp/)
>
> The git sha 034d00 from your org-version isn’t in my checkout.  Yours
> also thinks it’s 60ish commits ahead of where mine is (758 vs. 695).
> This is very strange; I don’t know what to make of it.
>
> I have:
>
> GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.6)
>
> What is your version of ESS?  (C-h v ess-version)  It’s 14.11 for me
> (actually a melpa install of the latest git version).
>
> I executed the attached elisp file, then loaded the attached org file,
> and could not reproduce the issue.  When doing so, the code that org
> executes is echoed to the *R* buffer.  Can you send what is echoed for
> you?  (You will have to edit in the appropriate paths to your org and
> ess installations, unless they are in emacs’s default load-path)
>
> I get:
>
> data.table <- local({
>      con <- textConnection(
>        "\"A\"   \"B\"   \"C\"
> \"115\" \"76\"  \"60\""
>      )
>      res <- utils::read.table(
>        con,
>        header    = TRUE,
>        row.names = NULL,
>        sep       = "\t",
>        as.is     = TRUE
>      )
>      close(con)
>      res
>    })
> data.table
> 'org_babel_R_eoe'
>
>
>
> Thanks,
>
> --
> Aaron Ecay
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix R table import
  2015-01-05  1:54       ` Michael Gauland
@ 2015-01-06  4:33         ` Aaron Ecay
  0 siblings, 0 replies; 7+ messages in thread
From: Aaron Ecay @ 2015-01-06  4:33 UTC (permalink / raw)
  To: Michael Gauland, Org-mode

Hi Michael,

Thanks for following up.  It’s concerning that this misbehavior seems
to depend on the ESS version.  However, since the latest version does
indeed work, I don’t think any intervention is warranted.

I’m glad the problem is fixed for you and sorry for the inconvenience.

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-06  4:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-04  5:00 [PATCH] Fix R table import Michael Gauland
2015-01-04  6:24 ` Aaron Ecay
2015-01-04 10:05   ` Andreas Leha
2015-01-04 19:20   ` Michael Gauland
2015-01-05  0:35     ` Aaron Ecay
2015-01-05  1:54       ` Michael Gauland
2015-01-06  4:33         ` Aaron Ecay

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).