powered by
The method also clones object attributes (such as the formatters).
Clone(node, pruneFun = NULL, attributes = FALSE)
the root node of the tree or sub-tree to clone
a function taking a Node as an argument, and returning TRUE if the Node and its descendants should be kept, FALSE otherwise.
Node
if FALSE, then attributes are not cloned. This makes the method much faster.
the clone of the tree
SetFormat
# NOT RUN { data(acme) acmeClone <- Clone(acme) acmeClone$name <- "New Acme" # acmeClone does not point to the same reference object anymore: acme$name # }
Run the code above in your browser using DataLab