list2inst: Build a Q7 Object Instance from a List

View source: R/utils.R

list2instR Documentation

Build a Q7 Object Instance from a List

Description

Build a Q7 Object Instance from a List

Usage

list2inst(x, s3 = "default", parent = parent.frame(), ...)

Arguments

x

list

s3

S3 class name of the instance

parent

parent environment of the instance

...

dot-dot-dot

Value

Q7 object instance

Examples

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


iqis/object documentation built on March 23, 2022, 11:19 p.m.