assign_attr {forestry}R 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")


[Package forestry version 0.1.1 Index]