From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Weylandt Subject: Out of Order Evaluation Date: Thu, 20 Mar 2014 18:02:20 -0400 Message-ID: <8AE0B11E-8EA2-41A8-8D0C-CDB610785239@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQl2u-0002rn-4s for emacs-orgmode@gnu.org; Thu, 20 Mar 2014 18:02:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQl2k-0007R6-HD for emacs-orgmode@gnu.org; Thu, 20 Mar 2014 18:02:40 -0400 Received: from mail-qc0-x229.google.com ([2607:f8b0:400d:c01::229]:40703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQl2k-0007Qs-EG for emacs-orgmode@gnu.org; Thu, 20 Mar 2014 18:02:30 -0400 Received: by mail-qc0-f169.google.com with SMTP id i17so1890992qcy.0 for ; Thu, 20 Mar 2014 15:02:29 -0700 (PDT) Received: from [10.170.64.231] (mobile-198-228-195-104.mycingular.net. [198.228.195.104]) by mx.google.com with ESMTPSA id b30sm4859896qge.21.2014.03.20.15.02.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 15:02:28 -0700 (PDT) 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" Hi,=20 I want to put a summary of my analysis at the beginning of a document using r= esults calculated at the end of the document. Is this possible?=20 #=3D=3D=3D=3D=3D=3D=3D=3D=3D #+TITLE: Test #+AUTHOR: Michael Weylandt #+PROPERTY: header-args:R :session *__R__* :exports both * Summary The mean result was src_R[:exports results]{mean(x)} * Analysis,=20 We do some complicated calculations:=20 #+BEGIN_SRC R x <- rnorm(5) #+END_SRC #=3D=3D=3D=3D=3D=3D=3D=3D=3D Is this possible in a single pass? I've played with #+NAME and <> b= ut haven't gotten the out-of-order evaluation quite right.=20 Michael (Bonus question, is there a way to not have to put ":exports results" in inl= ine blocks?)=