Skip to main content

Module loader

Module loader 

Source
Expand description

Package loading runtime — discovers, loads, and attaches R packages.

Implements the core package loading sequence:

  1. Find the package directory on .libPaths()
  2. Parse DESCRIPTION and NAMESPACE
  3. Create a namespace environment (parent = base env)
  4. Source all R/*.R files into the namespace env
  5. Build an exports environment (filtered view of namespace)
  6. For library(), attach the exports env to the search path
  7. Register S3 methods declared in NAMESPACE
  8. Run .onLoad() and .onAttach() hooks

Structs§

LoadedNamespace
State for a single loaded package namespace.
SearchPathEntry
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 Collate field from a DESCRIPTION file into an ordered list of filenames.