On Tue, Sep 4, 2012 at 11:42 AM, Greg Tucker-Kellogg
<gtuckerkell...@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
>
>

Reply via email to