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

extend.BasicObject

Extends another class


Description

via a mechanism known as "parasitic inheritance". Simply speaking this method "extends another class". What is actually happening is that it creates an instance of class name ...className, by taking another BasicObject instance and add ...className to the class list and also add all the named values in ... as fields to the new instance.

The method should be used by the constructor of a class and nowhere else.

Usage

## S3 method for class 'BasicObject'
extend(this, ...className, ...)

Arguments

...className

The name of new class.

...

Named values representing the fields of the new instance.

Value

Returns an BasicObject of class className.

Author(s)

Henrik Bengtsson

See Also

For more information see BasicObject.


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.