ggproto(`_class` = NULL, `_inherit` = NULL, ...)ggproto_parent(parent, self)
NULL
(the default), no class name will
be added to the object.NULL
, don't inherit
from any object.parent
of object self
.self
argument: if it is present,
it is a regular method; if it's absent, it's a "static" method (i.e. it
doesn't use any fields).Imagine you have a ggproto object Adder
, which has a
method addx = function(self, n) n + self$x
. Then, to call this
function, you would use Adder$addx(10)
-- the self
is passed
in automatically by the wrapper function. self
be located anywhere
in the function signature, although customarily it comes first.
ggproto_parent(Parent, self)
.