emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Babel: communicating irregular data to R source-code block


From: Eric Schulte
Subject: Re: [O] Babel: communicating irregular data to R source-code block
Date: Mon, 23 Apr 2012 18:55:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> 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.

1
1       1
1       2       1
1       3       3       1
1       4       6       4       1
1       5       10      10      5       1
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 via email to

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