list2inst | R Documentation |
Build a Q7 Object Instance from a List
list2inst(x, s3 = "default", parent = parent.frame(), ...)
x |
list |
s3 |
S3 class name of the instance |
parent |
parent environment of the instance |
... |
dot-dot-dot |
Q7 object instance
my_data <- list(a = 1, add_to_a = function(value){ .my$a <- a + value }) myDataObject <- list2inst(my_data) myDataObject$a myDataObject$add_to_a(20) myDataObject$a
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.