From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Tucker-Kellogg Subject: creating a list from an R source block Date: Wed, 5 Sep 2012 00:42:13 +0800 Message-ID: <54669FE1-F079-41EB-8C6A-9817A0F36E35@gmail.com> Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/alternative; boundary="Apple-Mail=_43D99F2A-777A-47C4-A61E-831F1FF92F23" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8wCl-0003p7-7D for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 12:42:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8wCh-0000HC-9q for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 12:42:23 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:45863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8wCh-0000H7-4l for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 12:42:19 -0400 Received: by iagk10 with SMTP id k10so10685039iag.0 for ; Tue, 04 Sep 2012 09:42:18 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List --Apple-Mail=_43D99F2A-777A-47C4-A61E-831F1FF92F23 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Creating a list in Org from a Ruby Array is trivial #+BEGIN_SRC ruby :exports results :results value list ["x" , "y", "z" ]=20 #+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:=20 - ("x") - ("y") - ("z") 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 =09= --Apple-Mail=_43D99F2A-777A-47C4-A61E-831F1FF92F23 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii 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: 
<= div>
- ("x")
- ("y")
- = ("z")

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


=
= --Apple-Mail=_43D99F2A-777A-47C4-A61E-831F1FF92F23-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: creating a list from an R source block Date: Tue, 4 Sep 2012 11:55:10 -0500 Message-ID: References: <54669FE1-F079-41EB-8C6A-9817A0F36E35@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8wPB-0008Ic-8B for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 12:55:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8wPA-0004Yv-5t for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 12:55:13 -0400 Received: from mail-qa0-f48.google.com ([209.85.216.48]:64805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8wP9-0004Xb-W5 for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 12:55:12 -0400 Received: by qady1 with SMTP id y1so3792056qad.0 for ; Tue, 04 Sep 2012 09:55:11 -0700 (PDT) In-Reply-To: <54669FE1-F079-41EB-8C6A-9817A0F36E35@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Greg Tucker-Kellogg Cc: Org Mode List On Tue, Sep 4, 2012 at 11:42 AM, Greg Tucker-Kellogg 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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Tucker-Kellogg Subject: Re: creating a list from an R source block Date: Wed, 5 Sep 2012 06:43:58 +0800 Message-ID: <0C56B510-C901-435F-86B2-66B4F5C750FA@gmail.com> References: <54669FE1-F079-41EB-8C6A-9817A0F36E35@gmail.com> Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T91qm-0006iC-7W for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 18:44:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T91ql-00057F-7Z for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 18:44:04 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:53625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T91ql-000574-1j for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 18:44:03 -0400 Received: by dadi14 with SMTP id i14so4905752dad.0 for ; Tue, 04 Sep 2012 15:44:02 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: Org Mode List 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 > wrote: >> Creating a list in Org from a Ruby Array is trivial >>=20 >> #+BEGIN_SRC ruby :exports results :results value list >> ["x" , "y", "z" ] >> #+END_SRC >>=20 >> #+RESULTS: >> - x >> - y >> - z >>=20 >>=20 >> But trying the same thing from R gives a surprising (to me) result >>=20 >> #+BEGIN_SRC R :exports results :results value list >> c("x","y","z") >> #+END_SRC >>=20 >> #+RESULTS: >> - ("x") >> - ("y") >> - ("z") >>=20 >=20 > Clunky, perhaps, but this works: >=20 > #+BEGIN_SRC R :exports results :results output org > a <- c("x","y","z") > cat(paste("-", a), sep=3D"\n") >=20 > #+END_SRC >=20 > #+RESULTS: > #+BEGIN_ORG > - x > - y > - z > #+END_ORG >=20 > Best regards, > John >=20 >=20 >>=20 >> 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? >>=20 >> Greg >>=20 >>=20