Learn R Programming

R.oo (version 1.2.7)

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 class 'Object}(this, ...)':
cloneundefined

...{Not used.}

A reference to the new object.

o1 <- Object()
  o2 <- clone(o1)

  print(equals(o1, o2))

Please note that no constructors are called during the creation of the clone and neither is any static class code called.
For more information see Object. [object Object] programming methods internal methods

Arguments