registerExtension: Register a single mizer extension for this R session

View source: R/registerExtensions.R

registerExtensionR Documentation

Register a single mizer extension for this R session

Description

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.

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.

Value

The updated extension chain, invisibly.

See Also

registerExtensions() for registering an explicit full chain. The guide to using mizer extension packages. "Creating a mizer extension package": Creating a mizer extension package

Other extension tools: NOther(), clearExtensionChain(), coerceToExtensionClass(), getRegisteredExtensions(), initialNOther<-(), recordExtension(), registerExtensions(), setComponent(), setRateFunction()


mizer documentation built on Aug. 24, 2026, 9:08 a.m.