From spinuvit at gmail.com  Wed Jun  5 16:18:29 2013
From: spinuvit at gmail.com (Vitalie Spinu)
Date: Wed, 5 Jun 2013 16:18:29 +0200
Subject: [Rd] strange value in .Last.value
In-Reply-To: <51AF283A.7080408@gmail.com> (Duncan Murdoch's message of "Wed, 5
	Jun 2013 07:59:54 -0400")
References: <87wqq94o95.fsf@med.uni-goettingen.de>
	<CAFOpNVF1=rgn6SUD9Cu7LyoFR01d_OoNj5k-two3Bua4XP3rUw@mail.gmail.com>
	<87k3m93t8c.fsf@med.uni-goettingen.de> <51AF283A.7080408@gmail.com>
Message-ID: <87vc5smyiy.fsf@gmail.com>



 >> Duncan Murdoch <murdoch.duncan at gmail.com>
 >> on Wed, 5 Jun 2013 07:59:54 -0400 wrote:

[...]

 >> As I take it, it is.  Thus, ess/orgmode -- which relies on .Last.value
 >> for results handling and does not expect that $visible element -- should
 >> adapt and ignore that explicitly?

 > I think you'll need to ask on the ESS list what the intentions are in this case.
 > The result of source() is a list with the value and visible entries.  This has
 > been true "forever", it's not new behaviour.  (It's unfortunate that this is not
 > clearly documented.)

ESS recently switched to "source" for evaluation in order to preserve
source references, and that ruins org-babel (a literate programming
backend) that relies on .Last.value.

Would a

     invisible(source('file.R', echo=TRUE)$value)

be a reliable solution to the problem? 


    Vitalie



[Rd] strange value in .Last.value
Vitalie Spinu