node_prune: Prune Nodes off a Tree by Names

View source: R/node_prune.R

node_pruneR Documentation

Prune Nodes off a Tree by Names

Description

A wrapper of data.tree::Prunes. Prune nodes off a tree by names. This function has side-effects, it modifies the tree given by the argument (see the package data.tree).

Usage

node_prune(tree, ...)

Arguments

tree

a tree (i.e. a Node object).

...

some character strings specifies the names of nodes to be pruned.

Value

Invisibly returns the tree.

Examples


dst <- node_new(
  "firm",
  "lab", "cap", "land"
)
node_prune(
  dst,
  "cap", "land"
)
plot(dst)


GE documentation built on Nov. 8, 2023, 9:07 a.m.

Related to node_prune in GE...