Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getInstanceOf.Arguments

Gets an instance of the object that is of a particular class


Description

Gets an instance of the object that is of a particular class.

Usage

## Static method (use this):
## Arguments$getInstanceOf(object, class, coerce=FALSE, ..., .name=NULL)

## Don't use the below:
## S3 method for class 'Arguments'
getInstanceOf(static, object, class, coerce=FALSE, ..., .name=NULL)

Arguments

object

The object that should be returned as an instance of class class.

class

A character string specifying the name of the class that the returned object should inherit from.

coerce

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.

.name

A character string for name used in error messages.

Value

Returns an object inheriting from class class.

Author(s)

Henrik Bengtsson

See Also

For more information see Arguments.


R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.