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

newInstance.Class

Creates a new instance of this class


Description

Creates a new instance of this class. Important: It should always be possible to create a new Object by calling the constructor without arguments. This method is simply calling the constructor method of the class.

Usage

## S3 method for class 'Class'
newInstance(this, ...)

Arguments

...

Not used.

Value

Returns a reference to an Object.

Author(s)

Henrik Bengtsson

See Also

newInstance.Object(). newInstance.BasicObject(). For more information see Class.

Examples

obj <- newInstance(Object, NA)

  # equivalent to

  obj <- Object(NA)

R.oo

R Object-Oriented Programming with or without References

v1.24.0
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.