From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: [babel] Emitting both text & graphics output Date: Tue, 22 Mar 2011 15:02:42 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=60955 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q27my-0004CX-D7 for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 16:02:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q27mx-0001zy-4I for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 16:02:48 -0400 Received: from mailout2-trp.thomsonreuters.com ([163.231.6.26]:36169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q27mw-0001zm-QP for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 16:02:47 -0400 Received: from trpusmneagrly02.int.westgroup.com (relay2 [163.231.22.113]) by mailout2-trp.thomsonreuters.com (Sentrion-MTA-4.0.5/Sentrion-MTA-4.0.5) with ESMTP id p2MK2jfK020755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 22 Mar 2011 20:02:45 GMT Received: from EAGE-ERFPHUB02.ERF.THOMSON.COM (EAGE-ERFPHUB02.erf.thomson.com [163.231.23.34]) by trpusmneagrly02.int.westgroup.com (Sentrion-MTA-4.0.5/Sentrion-MTA-4.0.5) with ESMTP id p2MK2hwP021790 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 22 Mar 2011 20:02:44 GMT Content-Language: en-US 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: emacs-orgmode@gnu.org Hi, Suppose I have a source block like the following, which both 'print's some text output and 'plot's to a graphics device: ------------------------------ #+begin_src R :file tp.png :exports both :results output graphics dat <- matrix(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. 'C-c C-c' results in the following 'results' section: ------------------------------ #+results: [[file:tp.png]] ------------------------------ And 'C-c C-e b' results in HTML output like this: ------------------------------
dat <-
matrix(runif(12), 6, 2)
print(dat)
plot(dat)

3D"tp.png"

------------------------------ Neither of those have the actual printed matrix output, which would be something like this: ------------------------------ #+begin_src R :exports both :results output dat <- matrix(runif(12), 6, 2) print(dat) #+end_src #+results: : [,1] [,2] : [1,] 0.3675202 0.1995134 : [2,] 0.9221087 0.1225686 : [3,] 0.6534830 0.6986238 : [4,] 0.3523151 0.1299406 : [5,] 0.7207582 0.5494278 : [6,] 0.3665547 0.6328452 ------------------------------ Any clues? Thanks. -- Ken Williams Senior Research Scientist Thomson Reuters http://labs.thomsonreuters.com