Description Usage Arguments Value Examples
Make methods
1 2 3 4 5 6 7 |
r6 |
R6 class for which to create methods |
field |
Character, fields for which to create method. May be "all", "public", "private" or name of class field. Multiple values allowed. |
method |
Character, methods to create. One of "both", "get", "set" |
add_roxygen |
Logical, whether to add roxygen description of method |
Character containing generated methods to put into class definition
1 2 3 4 5 | Example <- R6::R6Class("Example", list(public_field = NULL), list(private_field = NULL))
make_methods(Example)
make_methods(Example, "private", "get")
make_methods(Example, "private_field", c("get", "set"))
make_methods(Example, "public_field", c("both"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.