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