newInstance.Class

0th

Percentile

Creates a new instance of this class

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.

Keywords
methods, internal, programming
Usage
# S3 method for Class
newInstance(this, ...)
Arguments
...

Not used.

Value

Returns a reference to an Object.

See Also

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

Aliases
  • newInstance.Class
  • Class.newInstance
  • newInstance,Class-method
Examples
# NOT RUN {
  obj <- newInstance(Object, NA)

  # equivalent to

  obj <- Object(NA)
# }
Documentation reproduced from package R.oo, version 1.22.0, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.