Learn R Programming

R.oo (version 1.26.0)

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
newInstance(this, ...)

Value

Returns a reference to an Object.

Arguments

...

Not used.

Author

Henrik Bengtsson

See Also

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

Examples

Run this code
  obj <- newInstance(Object, NA)

  # equivalent to

  obj <- Object(NA)

Run the code above in your browser using DataLab