Learn R Programming

oops (version 0.2.0)

clone: Create a Copy of an oClass Instance

Description

A copy of all objects and attributes within an environment. If deep=TRUE, all objects inside of x, including other environments, will also be deeply "cloned". The global and base environments will not be cloned.

Usage

clone(x, deep = FALSE, ...)

clone_attributes(x, deep = FALSE, cloned = NULL)

Arguments

x

environment of class "Instance"

deep

logical for whether clone should be applied to all objects.

...

arguments passed to methods

cloned

environment containing references to environments that have already been cloned. This is passed to internal methods when deep=TRUE and should not be set directly.

Value

environment of class "Instance"

Functions

  • clone_attributes: Clone the attributes of an object.