Learn R Programming

R.oo (version 1.26.0)

clone.Object: Clones an Object

Description

Creates an identical copy of the object and returns a reference to the new object.

Usage

# S3 method for Object
clone(this, ...)

Value

A reference to the new object.

Arguments

...

Not used.

Author

Henrik Bengtsson

Details

Please note that no constructors are called during the creation of the clone and neither is any static class code called.

See Also

For more information see Object.

Examples

Run this code
  o1 <- Object()
  o2 <- clone(o1)

  print(equals(o1, o2))

Run the code above in your browser using DataLab