Learn R Programming

mizer (version 3.0.0)

assertExtensionChain: Assert that an object's extension chain is compatible with the session

Description

Stops with an informative error if the object's extension chain is not a suffix of the session's registered maximal chain, or (when check_class is TRUE) if the object does not inherit from the expected S4 marker class.

Usage

assertExtensionChain(
  object,
  extensions = objectExtensions(object),
  check_class = TRUE
)

Value

Invisibly TRUE. Called for its side-effect of stopping on incompatibility.

Arguments

object

A MizerParams or MizerSim object.

extensions

Named character vector giving the object's extension chain. Defaults to objectExtensions() applied to object.

check_class

Logical. If TRUE (default), also verify that object inherits from the expected S4 marker class.