Makes the fields and methods of an Class assignable via the
operator. This method is never called explicitly, but through an indirect
usage of the
$<- operator, e.g.
obj$name <- "foo".
This method will first search for a
method, e.g. if name has the value
be looked for. If such a method exists it will be called with the Class
as the first argument and
value as the second, e.g.
get<Name>() is only looked for if
<name> is not a
private field. A private field is a name beginning with a
. (period). The rational for this naming convention is to be
consistent with how
ls() works, which will not
list such members by default.
If no such method exists it will assign the
value to a
(existing or a non-existing) field named
is called first, it is possible to encapsulate (hide away) fields with certain names or to put restrictions to what values can be assigned to them.
1 2 3 4
The name of the
method or the name of the field to be assigned the new value.
The value to be assigned.
Returns itself, i.e.
this, as all
$<- methods must do.
For more information see
## Not run: For a complete example see help(Class).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.