Closed fengqifang closed 7 years ago
The github version of the package supports this feature more or less by making the children NAs, does that work for you?
Oh, will try it, did not see an example in the examples document.
tested it, it works well, thank you.
I have another two question
1) is that possible give label for each level of tree, not only the root, i.e., show the hierarchy levels at the top of each level of the tree?
2) The arguments 'attribute' in collapsibleTree() does not show up, though it works well in collapsibleTreeSummary. Is that possible I can use the 'attribute' showing some other information corresponding the node, not necessary in the input data.
Thank you
You're right, that definitely should be included in the examples document. Fixed!
warpbreaks %>%
mutate(
wool = paste("wool:", wool),
tension = paste("tension:", tension)
) %>%
collapsibleTree(c("wool", "tension"))
attribute
argument in collapsibleTree
and collapsibleTreeSummary
are both tied to tooltips, but in collapsibleTreeSummary
, it is additionally mapped to color gradient. But you need to enable the tooltip for it to show up. This attribute does not need to be a part of the input data. I have updated the examples to make this more clear:collapsibleTree(
warpbreaks, c("wool", "tension", "breaks"),
tooltip = TRUE,
attribute = "breaks"
)
Great package.
Just one question, if I'd like to present a 'paths' structure using this package, which leaves may not have the same depth.
For example, Root(100) have 3 children, A(50), B(20), C(30), then there is no child for node A, node B and C may continue to grow, in such case, how to arrange the data.tree structure?