clone.Q7instance {Q7} | R Documentation |
Clone an Instance
## S3 method for class 'Q7instance'
clone(inst, deep = TRUE, ...)
inst |
Q7 object instance |
deep |
to copy nested object instances recursively; Boolean |
... |
dot-dot-dot |
Q7 object instance
Type1 <- type(function(num){
print_num <- function(){
base::print(num)
}
})
myType1 <- Type1(1)
myType1$print_num()
myType1_clone <- clone(myType1)
myType1_clone$print_num()