assign_attr: assign attributes to node; work with fix_items function

View source: R/node.R

assign_attrR Documentation

assign attributes to node; work with fix_items function

Description

assign attributes to node; work with fix_items function

Usage

assign_attr(node_from, node_to)

Arguments

node_from

assigned attributes from

node_to

assigned attributes to

Value

a node assigned attributes

Examples

cell_node1 <- data.tree::Node$new("cell1")
cell_node1$AddChild("A")
cell_node2 <- data.tree::Node$new("cell2")
cell_node2$AddChild("A")
cell_node2$Set(group = c(NA, "A1"))
print(assign_attr(node_from = cell_node1$A, node_to = cell_node2$A), "group")


forestry documentation built on Nov. 21, 2023, 1:07 a.m.