create_sub_tree {dexisensitivity} | R Documentation |
Create a Subtree Starting from a Specific Node
Description
Constructs a subtree from a specified Node
within a given Tree
.
This subtree encompasses all descendant attributes of the Node
.
Usage
create_sub_tree(tree, node_name, avoid_repetition = FALSE)
Arguments
tree |
a |
node_name |
A |
avoid_repetition |
A |
Value
A new Tree
object representing the subtree.
See Also
Relevant functions and classes that provide more context or might be of interest:
-
Tree-class
: For an in-depth understanding of theTree
class. -
Node-class
: To get more details about the structure of aNode
.
Examples
tree <- dexisensitivity::masc2
subtree <- create_sub_tree(masc2, masc2@Nodes[[2]]@Name)
subtree
# Equivalent to :
tree <- dexisensitivity::masc2
subtree <- create_sub_tree(masc2, "Dimension economique")
subtree
[Package dexisensitivity version 1.0.0 Index]