powered by
Clone an Instance
# S3 method for Q7instance clone(inst, deep = TRUE, ...)
Q7 object instance
to copy nested object instances recursively; Boolean
dot-dot-dot
# NOT RUN { Type1 <- type(function(num){ print_num <- function(){ base::print(num) } }) myType1 <- Type1(1) myType1$print_num() myType1_clone <- clone(myType1) myType1_clone$print_num() # }
Run the code above in your browser using DataLab