
Registers a Callback on Namespace load/unLoad Events
Source:R/register_namespace_callback.R
register_namespace_callback.RdRegister a function callback to be called after a namespace is loaded.
Calls callback once if the namespace has already been loaded before and
also adds an unload-hook that removes the load hook.
Arguments
- pkgname
(
character(1))
Name of the package which registers the callback.- namespace
(
character(1))
Namespace to react on.- callback
(
function())
Function to call on namespace load. The callback is invoked without arguments, so it can be defined asfunction()orfunction(...). Any arguments passed by the hook caller (e.g.packageandlib_pathfrompkgload) are discarded.