Skip to contents

Coerces a MizerParams or MizerSim object to the S3 class hierarchy corresponding to the object's own extension list. For MizerSim, the extension names are read from the embedded MizerParams object.

Usage

coerceToExtensionClass(object, extensions = objectExtensions(object))

Arguments

object

A MizerParams or MizerSim object.

extensions

Optional extension list or vector. Defaults to the extensions stored in object, or in object$params for MizerSim.

Value

The same object coerced to the appropriate S3 class vector, or to the base class for an empty extension list.

Details

This is infrastructure for extension package authors. Ordinary users should load saved models with readParams() or readSim(); validParams() and validSim() repair the class vector of an object that is already in memory.

See also