From murdoch.duncan at gmail.com  Wed Jun  5 13:59:54 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Wed, 5 Jun 2013 07:59:54 -0400
Subject: [Rd] strange value in .Last.value
In-Reply-To: <87k3m93t8c.fsf@med.uni-goettingen.de>
References: <87wqq94o95.fsf@med.uni-goettingen.de>
	<CAFOpNVF1=rgn6SUD9Cu7LyoFR01d_OoNj5k-two3Bua4XP3rUw@mail.gmail.com>
	<87k3m93t8c.fsf@med.uni-goettingen.de>
Message-ID: <51AF283A.7080408@gmail.com>

On 13-06-05 3:35 AM, Andreas Leha wrote:
> Hi Winston,
>
> Winston Chang <winstonchang1 at gmail.com> writes:
>
>> This is the result of the withVisible() function, which is called by
>> source(). This should illustrate what it does:
>>
>>> withVisible(1+1)
>> $value
>> [1] 2
>>
>> $visible
>> [1] TRUE
>>
>>
>>> withVisible(invisible(1+1))
>> $value
>> [1] 2
>>
>> $visible
>> [1] FALSE
>>
>
>
> Thanks for this.
>
> But besides the technical reason of the $visible element being part of
> .Last.value from a sourced statement, I guess my question is whether it
> is intended to be there.
>
> 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.)

Duncan Murdoch



[Rd] strange value in .Last.value
Duncan Murdoch