method {oosp} | R Documentation |
method objects
Description
Here, free methods are regarded methods, that are created and invoked directly, as functions. They are created by specifying a function, along with a series of attributes. A container object is automatically created containing those attributes. The container object (which is an environment) is accessed within the function using a dot. Hypermethods (which are also free methods) are a slight exception to this, and are intended to fake object level methods. They are created from an m object and wrap an m class method (taking care of the class's context attribute).
Usage
freemethod (f, ...)
hypermethod (obj, mid)
## S3 method for class 'freemethod':
print(f, ...)
Arguments
f |
A function, that can use a dot to reference the container object. |
obj |
An m object. |
mid |
Method identifier, as a character. |
... |
A series of attributes. i.e. A series of R objects to be assigned to the container object. If using ... as one of the arguments (i.e. to represent zero or more of the attributes), the top level call must explicitly name each value (name1=value1, name2=value2, etc). |
[Package
oosp version 0.2.3
Index]