Learn R Programming

forestry (version 0.1.1)

assign_attr: 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)

Value

a node assigned attributes

Arguments

node_from

assigned attributes from

node_to

assigned attributes to

Examples

Run this code
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")

Run the code above in your browser using DataLab