From bbolker at gmail.com  Sat Jun 29 00:07:03 2013
From: bbolker at gmail.com (Ben Bolker)
Date: Fri, 28 Jun 2013 18:07:03 -0400
Subject: [Rd] problem with eval(...,
 parent.frame(1L)) when package is not loaded
In-Reply-To: <CAJoaRhbgDzcw7RbUYLbRkA4LUWthDNzxOUghoQiy8tnZR6S+PQ@mail.gmail.com>
References: <51CD07D9.7070201@ufl.edu> <51CD66B7.60303@gmail.com>
	<loom.20130628T183725-282@post.gmane.org>
	<CAJoaRhbgDzcw7RbUYLbRkA4LUWthDNzxOUghoQiy8tnZR6S+PQ@mail.gmail.com>
Message-ID: <51CE0907.20000@gmail.com>

On 13-06-28 03:57 PM, Peter Meilstrup wrote:
> Well, once you begin messing with eval.parent(), you _are_ telling R
> what environment to work in, and things have the potential to go wrong
> at that point because you're telling R to work in environment you don't
> know anything about. Having to be explicit with a :: is just
> compensating for an earlier thing you "shouldn't need to" be doing with
> environments (in my opinion.)

  What would your preferred idiom be for this task (calling another
function with all of the arguments of the previous call, without
uglifying the call in the process)?  I read your e-mail about making the
comparison with S3 method dispatch, but to be honest I don't understand
it very well -- don't know if those particular techniques are applicable
here ... ?

  Ben

> 
> 
> On Fri, Jun 28, 2013 at 9:42 AM, Ben Bolker <bbolker at gmail.com
> <mailto:bbolker at gmail.com>> wrote:
> 
>     Duncan Murdoch <murdoch.duncan <at> gmail.com <http://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 ...
> 
>     ______________________________________________
>     R-devel at r-project.org <mailto:R-devel at r-project.org> mailing list
>     https://stat.ethz.ch/mailman/listinfo/r-devel
> 
>



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