An explanation of this would be nice in ?makeActiveBinding, e.g.,
NOTE:
When an environment is attach()'ed to the search path, any active
bindings in it are not preserved as active bindings. This happens
because attach() actually adds a new environment to the search path, and
copies objects
Hi,
I was wondering if this is expected behavior for active bindings in
attached environments, or if this is a bug:
> e <- new.env()
> makeActiveBinding('x',function() 'foo',e)
> ls(e)
[1] "x"
> attach(e)
> search()
[1] ".GlobalEnv""e" "package:graphics"
[4] "package:gr
On Thu, Nov 5, 2009 at 9:53 AM, Jeffrey Horner wrote:
>
> Hi,
>
> Is this expected behavior for active bindings in attached
> environments, or is this a bug:
>
> > e <- new.env()
> > makeActiveBinding('x',function() 'foo',e)
> > ls(e)
> [1] "x"
> > attach(e)
> > search()
> [1] ".GlobalEnv"