as.simObj: Coerce simObj Objects to Lists and Vice-Versa
Description
These functions can be used to coerce (i.e. convert) simecol model objects
(simObj objects) to ordinary lists.
Usage
## S3 method for class 'list':
as.simObj(x, ...)
## S3 method for class 'simObj':
as.list(x, ...)
## alternative usage:
# as(x, "list")
# as(x, "simObj")
Arguments
x
object to be coerced
...
for compatibility
Details
Function as.list converts the respective simObj model to an
ordinary list with an additional element 'class' storing the class name of the
original object.
Function as.simObj converts in the opposite direction where the type
of the object to be created is determined by a class name stored in the
list element 'class'. If it is missing or contains a non-existing class
name, an error message is printed. Additional list elements which are not slot
names of the corresponding S4 object are omitted.