emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: Michael Hannon <jm_hannon@yahoo.com>,
	Org-Mode List <emacs-orgmode@gnu.org>,
	Eric Schulte <eric.schulte@gmx.com>
Subject: Re: Babel: communicating irregular data to R source-code block
Date: Mon, 23 Apr 2012 18:55:56 -0400	[thread overview]
Message-ID: <87aa22t5vn.fsf@gmx.com> (raw)
In-Reply-To: <m1vckqx9j6.fsf@tsdye.com> (Thomas S. Dye's message of "Mon, 23 Apr 2012 14:23:25 -1000")

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

> If I add fill=TRUE to that (on a git branch), then I get this:
>
> #+RESULTS: pascals-triangle
> | 1 |   |    |    |   |   |
> | 1 | 1 |    |    |   |   |
> | 1 | 2 |  1 |    |   |   |
> | 1 | 3 |  3 |  1 |   |   |
> | 1 | 4 |  6 |  4 | 1 |   |
> | 1 | 5 | 10 | 10 | 5 | 1 |
>
> #+NAME: sanity-check
> #+HEADER: :var sc_input=pascals-triangle
> #+BEGIN_SRC R
> sc_input
> #+END_SRC
> #+RESULTS: sanity-check
>
> | 1 | nil | nil | nil | nil |
> | 1 |   1 | nil | nil | nil |
> | 1 |   2 |   1 | nil | nil |
> | 1 |   3 |   3 | 1   | nil |
> | 1 |   4 |   6 | 4   | 1   |
> | 1 |   5 |  10 | 10  | 5   |
> | 1 | nil | nil | nil | nil |
>
> which isn't correct, but gets past the scan error.
>

Hmm, this happens with my patch applied as well.  It seems to me this
*must* be an R error.  The raw textual data pre-import has no such wrap.


[-- Attachment #2: R-import-19562ZU2 --]
[-- Type: text/plain, Size: 44 bytes --]

1
1	1
1	2	1
1	3	3	1
1	4	6	4	1
1	5	10	10	5	1

[-- Attachment #3: Type: text/plain, Size: 375 bytes --]


Why would R intentionally wrap a table at an arbitrary column?

>
> I'm in over my head here, but hope that my curiosity hasn't been too
> noisy.
>

Me too.  Unless someone who is familiar with the motivations and design
decisions behind R's read.table function, I'm inclined to leave the
current Org-mode code as is.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  reply	other threads:[~2012-04-24  0:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-21 20:17 Babel: communicating irregular data to R source-code block Michael Hannon
2012-04-22  0:44 ` Thomas S. Dye
2012-04-22 15:58   ` Eric Schulte
2012-04-23 16:46     ` Thomas S. Dye
2012-04-23 15:41       ` Eric Schulte
2012-04-23 19:17         ` Thomas S. Dye
2012-04-23 22:24     ` Michael Hannon
2012-04-23 21:05       ` Eric Schulte
2012-04-24  0:23       ` Thomas S. Dye
2012-04-23 22:55         ` Eric Schulte [this message]
2012-04-24  6:44           ` Thomas S. Dye
2012-04-24  7:07             ` Michael Hannon
2012-04-24 17:18               ` Thomas S. Dye
2012-04-24 19:23                 ` Thomas S. Dye
2012-04-25 23:52               ` Thomas S. Dye
2012-04-26  2:06                 ` Michael Hannon
2012-04-26  6:34                   ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aa22t5vn.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jm_hannon@yahoo.com \
    --cc=tsd@tsdye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).