From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seb Subject: R source code block :session Date: Sun, 30 Sep 2018 10:18:01 -0500 Message-ID: <87wor3ko9i.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6dUF-0000mF-0L for emacs-orgmode@gnu.org; Sun, 30 Sep 2018 11:18:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6dUB-0003h9-60 for emacs-orgmode@gnu.org; Sun, 30 Sep 2018 11:18:22 -0400 Received: from [195.159.176.226] (port=59837 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6dU8-0003gV-O2 for emacs-orgmode@gnu.org; Sun, 30 Sep 2018 11:18:17 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1g6dRw-0002Ch-7w for emacs-orgmode@gnu.org; Sun, 30 Sep 2018 17:16:00 +0200 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" To: emacs-orgmode@gnu.org Hello, I'm running into a couple of issues with R source code blocks using :session : ---<--------------------cut here---------------start------------------->--- #+NAME: test01 #+BEGIN_SRC R :session :results output library(ascii) numstbl <- table(1:4, 1:4) summary(numstbl) #+END_SRC #+RESULTS: test01 : R> Number of cases in table: 4 : Number of factors: 2 : Test for independence of all factors: : Chisq = 12, df = 9, p-value = 0.2 : Chi-squared approximation may be incorrect ---<--------------------cut here---------------end--------------------->--- Notice the "R> " prompt that prefixes the actual output. If the first line (`library` call) is removed, then the prompt is correctly excluded from the results output. I do have `options(prompt="R> ")` in my ~/.Rprofile. The other problem: ---<--------------------cut here---------------start------------------->--- #+NAME: test02 #+BEGIN_SRC R :results output org library(ascii) options(asciiType="org") ascii(summary(table(1:4, 1:4))) #+END_SRC #+RESULTS: test02 #+BEGIN_SRC org - Number of cases in table: 4 - Number of factors: 2 - Test for independence of all factors: - Chisq = 12, df = 9, p-value = 0.2 - Chi-squared approximation may be incorrect #+END_SRC ---<--------------------cut here---------------end--------------------->--- According to the documentation https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html, the results output should be wrapped in #+BEGIN_ORG #+END_ORG, not in another source code block. Any tips much appreciated. Cheers, -- Seb