Clone | R Documentation |
The method also clones object attributes (such as the formatters), if desired.
If the method is called on a non-root, then the parent relationship is not cloned,
and the resulting Node
will be a root.
Clone(node, pruneFun = NULL, attributes = FALSE)
node |
the root node of the tree or sub-tree to clone |
pruneFun |
allows providing a prune criteria, i.e. a function taking a |
attributes |
if FALSE, then R class attributes (e.g. formatters and grViz styles) are not cloned. This makes the method faster. |
the clone of the tree or sub-tree
SetFormat
data(acme)
acmeClone <- Clone(acme)
acmeClone$name <- "New Acme"
# acmeClone does not point to the same reference object anymore:
acme$name
#cloning a subtree
data(acme)
itClone <- Clone(acme$IT)
itClone$isRoot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.