From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [babel] Emitting both text & graphics output Date: Tue, 22 Mar 2011 21:20:56 -0400 Message-ID: <3349.1300843256@alphaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=47538 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2Crn-0005d1-NC for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 21:28:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2Crm-0007TP-5l for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 21:28:07 -0400 Received: from vms173007pub.verizon.net ([206.46.173.7]:59923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2Crl-0007Ss-WB for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 21:28:06 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LIH00EOELE9G130@vms173007.mailsrvcs.net> for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 20:27:51 -0500 (CDT) In-reply-to: Message from suvayu ali of "Tue, 22 Mar 2011 16:28:38 PDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: suvayu ali Cc: Ken.Williams@thomsonreuters.com, nicholas.dokos@hp.com, emacs-orgmode@gnu.org suvayu ali wrote: > On Tue, Mar 22, 2011 at 1:02 PM, wrote: > > ------------------------------ > > #+begin_src R :file tp.png :exports both :results output graphics > > dat <- =A0matrix(runif(12), 6, 2) > > print(dat) > > plot(dat) > > #+end_src > > ------------------------------ > > > > > > > > I can't seem to get the print() output to display, either by exporting to > > HTML or by simple evaluation of the code block. > > > Exporting to HTML includes a plot for me. Are you sure you activated R prop= > erly? > ... but it doesn't include the print(dat) output. That's what the OP wanted I think. Nick PS. the session trick that Mikhail Titov suggested works well: --8<---------------cut here---------------start------------->8--- * Foo #+begin_src R :session *R* :exports both :results output dat <- matrix(runif(12), 6, 2) print(dat) #+end_src #+results: : [,1] [,2] : [1,] 0.3459181 0.04018971 : [2,] 0.9300838 0.75353098 : [3,] 0.4234347 0.51248641 : [4,] 0.3713377 0.23556420 : [5,] 0.2572491 0.73720994 : [6,] 0.7233642 0.58195861 #+begin_src R :session *R* :exports both :results graphics :file tp.png plot(dat) #+end_src #+results: [[file:tp.png]] --8<---------------cut here---------------end--------------->8---