| Line 3... |
Line 3... |
| 3 |
|
3 |
|
| 4 |
\alias{attachNamespace}
|
4 |
\alias{attachNamespace}
|
| 5 |
\alias{loadNamespace}
|
5 |
\alias{loadNamespace}
|
| 6 |
\alias{loadedNamespaces}
|
6 |
\alias{loadedNamespaces}
|
| 7 |
\alias{unloadNamespace}
|
7 |
\alias{unloadNamespace}
|
| 8 |
\alias{.onLoad}
|
- |
|
| 9 |
\alias{.onUnload}
|
- |
|
| 10 |
\alias{.onAttach}
|
- |
|
| 11 |
\alias{loadingNamespaceInfo}
|
8 |
\alias{loadingNamespaceInfo}
|
| 12 |
\alias{saveNamespaceImage}
|
9 |
\alias{saveNamespaceImage}
|
| 13 |
|
10 |
|
| 14 |
\usage{
|
11 |
\usage{
|
| 15 |
attachNamespace(ns, pos = 2)
|
12 |
attachNamespace(ns, pos = 2)
|
| Line 44... |
Line 41... |
| 44 |
|
41 |
|
| 45 |
\code{loadNamespace} loads the specified name space and registers it in
|
42 |
\code{loadNamespace} loads the specified name space and registers it in
|
| 46 |
an internal data base. A request to load a name space that is already
|
43 |
an internal data base. A request to load a name space that is already
|
| 47 |
loaded has no effect. The arguments have the same meaning as the
|
44 |
loaded has no effect. The arguments have the same meaning as the
|
| 48 |
corresponding arguments to \code{library}. After loading,
|
45 |
corresponding arguments to \code{library}. After loading,
|
| 49 |
\code{loadNamespace} looks for a hook function named \code{.onLoad} as
|
46 |
\code{loadNamespace} looks for a hook function named
|
| 50 |
an internal variable in the name space (it should not be exported).
|
47 |
\code{\link{.onLoad}} as an internal variable in the name space (it
|
| 51 |
This function is called with the same arguments as
|
48 |
should not be exported). This function is called with the same arguments
|
| 52 |
\code{.First.lib}. Partial loading is used so support installation with
|
49 |
as \code{.First.lib}. Partial loading is used to support installation with
|
| 53 |
the \option{--save} option.
|
50 |
the \option{--save} option.
|
| 54 |
|
51 |
|
| 55 |
\code{loadNamespace} does not attach the name space it loads to the
|
52 |
\code{loadNamespace} does not attach the name space it loads to the
|
| 56 |
search path. \code{attachNamespace} can be used to attach a frame
|
53 |
search path. \code{attachNamespace} can be used to attach a frame
|
| 57 |
containing the exported values of a name space to the search path.
|
54 |
containing the exported values of a name space to the search path.
|
| 58 |
The hook function \code{.onAttach} is run after the name space
|
55 |
The hook function \code{\link{.onAttach}} is run after the name space
|
| 59 |
exports are attached, but this is not likely to be useful. Shared
|
- |
|
| 60 |
library loading and setting of options should be handled at load
|
- |
|
| 61 |
time by the \code{.onLoad} hook.
|
56 |
exports are attached.
|
| 62 |
|
57 |
|
| 63 |
\code{loadedNamespaces} returns a character vector of the names of
|
58 |
\code{loadedNamespaces} returns a character vector of the names of
|
| 64 |
the loaded name spaces.
|
59 |
the loaded name spaces.
|
| 65 |
|
60 |
|
| 66 |
\code{unloadNamespace} can be used to force
|
61 |
\code{unloadNamespace} can be used to force
|
| 67 |
a name space to be unloaded. An error is signaled if the name space
|
62 |
a name space to be unloaded. An error is signaled if the name space
|
| 68 |
is imported by other loaded name spaces. If defined, a hook
|
63 |
is imported by other loaded name spaces. If defined, a hook
|
| 69 |
function \code{.onUnload}, analogous to \code{.Last.lib}, is run
|
64 |
function \code{\code{.onUnload}} is run
|
| 70 |
before removing the name space from the internal registry.
|
65 |
before removing the name space from the internal registry.
|
| 71 |
\code{unloadNamespace} will first \code{\link{detach}} a package of
|
66 |
\code{unloadNamespace} will first \code{\link{detach}} a package of
|
| 72 |
the same name if one is on the path, thereby running a
|
67 |
the same name if one is on the path, thereby running a
|
| 73 |
\code{.Last.lib} function in the package if one is exported.
|
68 |
\code{.Last.lib} function in the package if one is exported.
|
| 74 |
|
69 |
|