Skip to contents

Prepends one extension to the front of the active extension chain, giving it the highest dispatch priority. Designed to be called from a package's .onLoad hook so that the chain grows naturally in load order: the last package loaded ends up outermost.

Usage

registerExtension(name, requirement = NA_character_, install = FALSE)

Arguments

name

A syntactically valid R name identifying the extension (e.g. "mizerExtA"). This name is used as the S4 marker class name.

requirement

A version string, installation specification, or NA_character_ (the default). NA_character_ marks an in-development extension whose S4 marker class mizer creates automatically. A version string such as "1.2.0" records the minimum required package version.

install

Logical. If TRUE, attempt to install a missing extension package.

Value

The updated extension chain, invisibly.

Details

The call is idempotent: if the extension is already registered at any position in the chain, the function returns silently without modifying the chain. This makes it safe to call from devtools::load_all(), which re-executes .onLoad.