From bbolker at gmail.com  Fri Jun 28 20:55:14 2013
From: bbolker at gmail.com (Ben Bolker)
Date: Fri, 28 Jun 2013 14:55:14 -0400
Subject: [Rd] problem with eval(...,
 parent.frame(1L)) when package is not loaded
In-Reply-To: <51CDCE4A.6010407@gmail.com>
References: <51CD07D9.7070201@ufl.edu> <51CD66B7.60303@gmail.com>
	<loom.20130628T183725-282@post.gmane.org>
	<51CDCE4A.6010407@gmail.com>
Message-ID: <51CDDC12.8070602@gmail.com>

On 13-06-28 01:56 PM, Duncan Murdoch wrote:
> On 28/06/2013 12:42 PM, Ben Bolker wrote:
>> Duncan Murdoch <murdoch.duncan <at> gmail.com> writes:
>>
>> >
>>
>> [snip]
>> >
>> > The other choice is to use the explicit ::, i.e.
>> >
>> > mc[[1]] <- quote(lmer::lFormula)
>> >
>> > This would be the solution I'd prefer, but you seem to have some
>> > prejudice against :: .
>> >
>>
>>    I just thought that the whole point of using the machinery of
>> namespaces, environments, etc., was that we shouldn't need to
>> tell R explicitly what environment we were working in ...
> 
> And usually it works, just not always when you do surgery on
> expressions.  The snipped version worked, for instance.
> 
> Duncan Murdoch

  Fair enough.  I guess the problem is that I often look in core R
functions to figure out the right idioms to use, and it wasn't obvious
that this was a dangerous one ... it's fairly common and I don't see
warnings in the source code about it ...

  Ben



[Rd] problem with eval(..., parent.frame(1L)) when package is not loaded
Ben Bolker