View source: R/match_branch_to_label.R
match_branch_to_label | R Documentation |
Assume that there are node labels and these may be non-unique. We assign these labels by joining a lookup table of labels and edges with the tree object, in this case the long array format.
match_branch_to_label(probs_long, probs_from_to_lookup)
probs_long |
Long format array tree object |
probs_from_to_lookup |
edge-label look-up table |
Separating the tree structure and labelling means that we can reuse the same tree with different labels e.g. another test or treatment
dataframe
match_branchlabel_to_prob
probs_long <- tibble::tribble(~from, ~to, ~prob, 1, 2, 0.5, 1, 3, 0.5) pname_from_to <- tibble::tribble(~from, ~to, ~name, 1, 2, "pos", 1, 3, "neg") match_branch_to_label(probs_long, pname_from_to)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.