Learn R Programming

Q7 (version 0.1.0)

clone.Q7instance: Clone an Instance

Description

Clone an Instance

Usage

# S3 method for Q7instance
clone(inst, deep = TRUE, ...)

Arguments

inst

Q7 object instance

deep

to copy nested object instances recursively; Boolean

...

dot-dot-dot

Value

Q7 object instance

Examples

Run this code
# 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