emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [babel] Specified colnames
Date: Mon, 08 Apr 2013 21:45:34 +0200	[thread overview]
Message-ID: <86ip3w957l.fsf@somewhere.org> (raw)
In-Reply-To: 87obdp0ybb.fsf@gmail.com

Hi Eric,

Eric Schulte wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> I'm trying to specify the column names of the table.
>> #+name: input
>> | title | baz |
>> |-------+-----|
>> | obs1  | foo |
>> | obs2  | bar |
>> But both versions (with symbols or strings) just do return the plain input
>> table.
>> #+name: R-echo-colnames-list
>> #+begin_src R :var data=input :exports results :colnames '(Rev Author)
>> data
>> #+end_src
>> #+name: R-echo-colnames-qlist
>> #+begin_src R :var data=input :exports results :colnames '("Rev" "Author")
>> data
>> #+end_src
>> Am I doing something wrong?
> It looks like ob-R implements its own result table reconstruction
> instead of using the general support.  This is because R actually has a
> notion of column names and row names internally.  The implementation in
> ob-R does not correctly handle specified colnmaes as your example shows.
> The attached patch brings ob-R closer to the using the unified general
> table reconstructed used in most other languages, and fixes your problem
> mentioned above.  I haven't applied it however, as it may introduce
> other bugs related to specifying column names from within R.  For
> example, I'm not sure that it will now correctly apply column names from
> a table built entirely from within R.

Thanks for your help.

Extra question: tested with a sh block, both of the above do work, that is
with strings or symbols. Which one is supposed to be better (that is, will be
more portable with time), if there is one?

> Additional testing by someone more familiar with R than myself would be
> greatly appreciated.

Can't yet be that person, sadly. But time will come that...

Best regards,

Sebastien Vauban

  reply	other threads:[~2013-04-08 19:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-07 20:11 [babel] Specified colnames Sebastien Vauban
2013-04-08 16:41 ` Eric Schulte
2013-04-08 19:45   ` Sebastien Vauban [this message]
2013-04-08 20:15     ` Eric Schulte
2013-04-08 20:49       ` Sebastien Vauban
2013-04-12 21:42         ` Eric Schulte
2013-04-18 21:25           ` Sebastien Vauban
2013-04-20 10:11             ` Eric Schulte
2013-04-25 13:28               ` Sebastien Vauban
2013-04-27 15:02                 ` Eric Schulte
2013-04-27 16:06                   ` Sebastien Vauban
2013-04-27 16:47                     ` Eric Schulte

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:

  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=86ip3w957l.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \


* 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


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