[Rd] problem with eval(..., parent.frame(1L)) when package is not loaded
bbolker at gmail.com
Sat Jun 29 00:07:03 CEST 2013
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 ... ?
> 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>>
> > The other choice is to use the explicit ::, i.e.
> > mc[] <- 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
More information about the R-devel