Description Usage Arguments Details See Also Examples
Normally, objects in a NAMESPACEd package are locked and can't be changed. Sometimes this isn't what you want; you can prevent it by calling dont.lockBindings
in the .onLoad
for the package. For user-visible objects (i.e. things that end up in the "package:blah" environment on the search path), you can achieve the same effect by calling dont.lockBindings
in the package's .onAttach
function, with namespace=FALSE
.
1 | dont.lockBindings( what, pkgname, namespace.=TRUE)
|
what |
(character) the names of the objects to not lock. |
pkgname |
(string) the name of the package. As you will only use this inside |
namespace. |
TRUE to antilock in the namespace during |
Locking occurs after .onLoad
/ .onAttach
are called so, to circumvent it, dont.lockBindings
creates a hook function to be called after the locking step.
1 2 3 4 5 6 7 8 9 | ## Not run:
library( debug)
debug:::.onLoad # d.lB is called to make 'tracees' editable inside 'debug's namespace.
debug:::.onAttach # d.lB is called to make 'tracees' editable in the search path
# NB also that an active binding is used to ensure that the 'tracees' object in the search...
#... path is a "shadow of" or "pointer to" the one in 'debug's namespace; the two cannot get...
#... out-of-synch
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.