emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] creating a list from an R source block


From: Greg Tucker-Kellogg
Subject: Re: [O] creating a list from an R source block
Date: Wed, 5 Sep 2012 06:43:58 +0800

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
> <address@hidden> 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
>> 
>> 




reply via email to

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