Gets an instance of the object that is of a particular class.
## Static method (use this):
## Arguments$getInstanceOf(object, class, coerce=FALSE, ..., .name=NULL)## Don't use the below:
# S3 method for Arguments
getInstanceOf(static, object, class, coerce=FALSE, ..., .name=NULL)
Returns an object inheriting from class class
.
The object that should be returned as an instance of
class class
.
A character
string specifying the name of the class that
the returned object should inherit from.
If TRUE
and the object is not of the wanted class, then
method will be coerced to that class, if possible. Otherwise,
an error is thrown.
Not used.
A character
string for name used in error messages.
Henrik Bengtsson
For more information see Arguments
.