list2inst: Build a Q7 Object Instance from a List

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Build a Q7 Object Instance from a List

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

Q7 documentation built on Jan. 13, 2021, 10:11 a.m.