[Rd] strange value in .Last.value

Vitalie Spinu spinuvit at gmail.com
Wed Jun 5 16:18:29 CEST 2013



 >> 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



More information about the R-devel mailing list