From mboxrd@z Thu Jan 1 00:00:00 1970 From: SabreWolfy Subject: Re: Exporting output and graphics from R Date: Fri, 31 May 2013 12:13:49 +0000 (UTC) Message-ID: References: <86li6wvenc.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiODg-0001kc-AX for emacs-orgmode@gnu.org; Fri, 31 May 2013 08:14:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiODe-00021n-Sh for emacs-orgmode@gnu.org; Fri, 31 May 2013 08:14:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:36349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiODe-00021e-ME for emacs-orgmode@gnu.org; Fri, 31 May 2013 08:14:06 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UiODd-0003H7-46 for emacs-orgmode@gnu.org; Fri, 31 May 2013 14:14:05 +0200 Received: from ss0.wits.ac.za ([146.141.1.90]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 May 2013 14:14:05 +0200 Received: from sabrewolfy by ss0.wits.ac.za with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 May 2013 14:14:05 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Sebastien Vauban writes: > AFAICT, you can't have both at the same time. Do you have a real > use case for this? Maybe I'm not using the right tool for the job. I thought it would be useful to be able to intersperse explanatory text with output: --8<---------------cut here---------------start------------->8--- All crows are black. We know this from looking at crows. I analyzed a dataset using this code, and produced a graph as follows: #+BEGIN_SRC R :results graphics :file testout.png :exports both # load data, analyze, make graph #+END_SRC The above analysis shows that all crows are black. A table of observed results is as follows: #+BEGIN_SRC R :results # more R code using the same dataset # will only work if the dataset is loaded again #+END_SRC This can be summarized with the following results: #+BEGIN_SRC R :results graphics :file testout.png :exports both # R code plotting another graph and showing another output table #+END_SRC --8<---------------cut here---------------end--------------->8--- My idea is that I would like the R code included for my reference when reading the document. I would also like the explanatory text, etc. included, as well as the output and results for the people who will be reading the document. Easier just to do it all in LaTeX directly? But then the code is not live, like it is in Org.