get_private<- | R Documentation |
Convenience function to assign a value to a private field of an R6::R6Class instance.
get_private(x, which) <- value
x |
(any) |
which |
(character(1)) |
value |
(any) |
The R6 instance x, modified in-place. If it is not an R6 instance, NULL is returned.
library(R6)
item = R6Class("Item", private = list(x = 1))$new()
get_private(item)$x
get_private(item, "x") = 2L
get_private(item)$x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.