ns-lowlev                package:base                R Documentation

_L_o_w _L_e_v_e_l _N_a_m_e _S_p_a_c_e _S_u_p_p_o_r_t _F_u_n_c_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Low level name space support functions.

_U_s_a_g_e:

     attachNamespace(ns, pos = 2)
     loadNamespace(package, lib.loc = NULL,
                   keep.source = getOption("keep.source.pkgs"),
                   partial = FALSE, declarativeOnly = FALSE)
     loadedNamespaces()
     unloadNamespace(ns)
     loadingNamespaceInfo()
     saveNamespaceImage(package, rdafile, lib.loc = NULL,
                        keep.source = getOption("keep.source.pkgs"))

_A_r_g_u_m_e_n_t_s:

      ns: string or namespace object.

     pos: integer specifying position to attach.

 package: string naming the package/name space to load.

 lib.loc: character vector specifying library search path.

keep.source: logical specifying whether to retain source.

 partial: logical; if true, stop just after laoding code.

declarativeOnly: logical; disables '.Import', etc, if true.

_D_e_t_a_i_l_s:

     The functions 'loadNamespace' and 'attachNamespace' are usually
     called implicitly when 'library' is used to load a name space and
     any imports needed.  However it may be useful to call these
     functions directly at times.

     'loadNamespace' loads the specified name space and registers it in
     an internal data base.  A request to load a name space that is
     already loaded has no effect.  The arguments have the same meaning
     as the corresponding arguments to 'library'.  After loading,
     'loadNamespace' looks for a hook function named '.onLoad' as  an
     internal variable in the name space (it should not be exported).
     This function is called with the same arguments as '.First.lib'. 
     Partial loading is used so support installation with the '--save'
     option.

     'loadNamespace' does not attach the name space it loads to the
     search path.  'attachNamespace' can be used to attach a frame
     containing the exported values of a name space to the search path.
     The hook function '.onAttach' is run after the name space exports
     are attached, but this is not likely to be useful.  Shared library
     loading and setting of options should be handled at load time by
     the '.onLoad' hook.

     'loadedNamespaces' returns a character vector of the names of the
     loaded name spaces.

     'unloadNamespace' can be used to force a name space to be
     unloaded.  An error is signaled if the name space is imported by
     other loaded name spaces.  If defined, a hook function
     '.onUnload', analogous to '.Last.lib', is run before removing the
     name space from the internal registry. 'unloadNamespace' will
     first 'detach' a package of the same name if one is on the path,
     thereby running a '.Last.lib' function in the package if one is
     exported.

     'loadingNamespaceInfo' returns a list of the arguments that would
     be passed to '.onLoad' when a name space is being loaded. An error
     is signaled of a name space is not currently being loaded.

     'saveNamespaceImage' is used to save name space images for
     packages installed with '--save'.

_A_u_t_h_o_r(_s):

     Luke Tierney

