powered by
Sort chidren nodes with certain order
children_sort(input_node, input_order, mismatch_last = T)
tree with children nodes sorted with certian order
input node
children node order
TRUE: mismatched children nodes are at the bottom; FALSE: mismatched nodes are at the top
data(test_df) test_node <- data.tree::as.Node(test_df) sorted_node <- children_sort( input_node = test_node, input_order = c("groupB", "groupA"), mismatch_last = TRUE) print(sorted_node)
Run the code above in your browser using DataLab