Skip to content
Prev 3654 / 12125 Next

[R-pkg-devel] active bindings in package namespace

Thanks for that thought. I do also do this in that package, and the same problem exists, since the code in those particular steps of R CMD check also calls .onLoad. These steps might even attach the package: the R CMD check code in tools is too convoluted for me to unravel, but the result is the same: active bindings defined directly in the namespace, or inserted into it from .onLoad, get run. .onAttach isn't possible because the namespace is sealed already.

In the example you offer from CLI, the binding is inserted into the "dummy" function's immediately enclosing environment, which is AFAIK not the same as the package namespace.

Jack
On 3/23/19 2:14 PM, G?bor Cs?rdi wrote: