Learn R Programming

mizer (version 3.0.0)

registerExtension: 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)

Value

The updated extension chain, invisibly.

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.

See Also

registerExtensions() for registering an explicit full chain. "Using mizer extension packages": vignette("using-extension-packages", package = "mizer"). "Creating a mizer extension package": vignette("creating-extension-packages", package = "mizer")

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