Methods for Version Management in Package `distr'
isOldVersion(object) conv2NewVersion(object) # S4 method for ANY isOldVersion(object) # S4 method for ANY conv2NewVersion(object) # S4 method for LatticeDistribution conv2NewVersion(object)
object of class
From version 1.9 of this package on, class
"AbscontDistribution" has an extra slot
gaps. As the addition of new slots will probably happen again in the future development
of our packages, we provide the following two help functions
conv2NewVersion to check whether the object was generated by an
older version of this package and to convert such an object to the new format, respectively.
Also, the intermediate class
"LatticeDistribution" is introduced at version 1.9
so that all subclasses of
now have an extra slot
conv2NewVersion takes this up and provides
a particular method for signature
"LatticeDistribution" which fills slot
signature(object = "ANY"): throws an error if
FALSE, i.e.; if the class of
objectis no formal (S4) class. Else it checks whether all slots of the actual class definition may be accessed and if so returns
TRUEand issues a warning.
signature(object = "ANY"): Generates a valid copy of
object(according to the actual class definition), using the slots of
objectwhere possible and for the slots which are not yet present in
object(because it was generated by an older version of the class definition), it generates a prototype object of the class of
new(class(object))and uses the slot values of this prototype to fill the missing slots.
signature(object = "LatticeDistribution"): Generates a valid copy of
object(according to the actual class definition, i.e.; with a corresponding
lattice-slot), by generating a new instance of this object by