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 > >