From: Greg Tucker-Kellogg <gtuckerkellogg@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: creating a list from an R source block
Date: Wed, 5 Sep 2012 06:43:58 +0800 [thread overview]
Message-ID: <0C56B510-C901-435F-86B2-66B4F5C750FA@gmail.com> (raw)
In-Reply-To: <CA+M2ft_5A98=Mr7RpGVmyHr2M-qMsN=P0eGJcoBrPgYk3eTJRQ@mail.gmail.com>
Thanks, that works. But does this count as a bug in ob-R?
Greg
On Sep 5, 2012, at 12:55 AM, John Hendy wrote:
> On Tue, Sep 4, 2012 at 11:42 AM, Greg Tucker-Kellogg
> <gtuckerkellogg@gmail.com> wrote:
>> Creating a list in Org from a Ruby Array is trivial
>>
>> #+BEGIN_SRC ruby :exports results :results value list
>> ["x" , "y", "z" ]
>> #+END_SRC
>>
>> #+RESULTS:
>> - x
>> - y
>> - z
>>
>>
>> But trying the same thing from R gives a surprising (to me) result
>>
>> #+BEGIN_SRC R :exports results :results value list
>> c("x","y","z")
>> #+END_SRC
>>
>> #+RESULTS:
>> - ("x")
>> - ("y")
>> - ("z")
>>
>
> Clunky, perhaps, but this works:
>
> #+BEGIN_SRC R :exports results :results output org
> a <- c("x","y","z")
> cat(paste("-", a), sep="\n")
>
> #+END_SRC
>
> #+RESULTS:
> #+BEGIN_ORG
> - x
> - y
> - z
> #+END_ORG
>
> Best regards,
> John
>
>
>>
>> removing the list header creates a table, but there seems to be no
>> straightforward way in R to create a list of elements that is treated by Org
>> as a list. Am I missing something?
>>
>> Greg
>>
>>
prev parent reply other threads:[~2012-09-04 22:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 16:42 creating a list from an R source block Greg Tucker-Kellogg
2012-09-04 16:55 ` John Hendy
2012-09-04 22:43 ` Greg Tucker-Kellogg [this message]
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=0C56B510-C901-435F-86B2-66B4F5C750FA@gmail.com \
--to=gtuckerkellogg@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jw.hendy@gmail.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).