Expand description
Package loading runtime — discovers, loads, and attaches R packages.
Implements the core package loading sequence:
- Find the package directory on
.libPaths() - Parse DESCRIPTION and NAMESPACE
- Create a namespace environment (parent = base env)
- Source all
R/*.Rfiles into the namespace env - Build an exports environment (filtered view of namespace)
- For
library(), attach the exports env to the search path - Register S3 methods declared in NAMESPACE
- Run
.onLoad()and.onAttach()hooks
Structs§
- Loaded
Namespace - State for a single loaded package namespace.
- Search
Path Entry - An entry on the search path. In R, the search path is:
.GlobalEnv->package:foo->package:bar-> … ->package:base
Functions§
- bind_
native_ 🔒symbol - Create a NativeSymbolInfo-like binding in a namespace environment.
- parse_
collate_ 🔒field - Parse the
Collatefield from a DESCRIPTION file into an ordered list of filenames.