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 Tree object from which the subtree is derived.

node_name

A character indicating the name of the starting Node for the subtree.

avoid_repetition

A logical indicating whether to avoid node repetitions. Default is FALSE.

Value

A new Tree object representing the subtree.

See Also

Relevant functions and classes that provide more context or might be of interest:

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.1 Index]