Skip to contents

We have a look-up table of labels and values. We can join the values to nodes/edges via their labels.

Usage

match_branchlabel_to_prob(probs_names, branch_probs_long)

Arguments

probs_names

label-probability look-up

branch_probs_long

long format tree object with labels

Value

dataframe

Examples

probs_long <-
  tibble::tribble(~from, ~to, ~name,
                  1, 2, "pos",
                  1, 3, "neg")
probs_names <-
  tibble::tribble(~prob, ~name,
                  0.4, "pos",
                  0.6, "neg")

match_branchlabel_to_prob(probs_names, probs_long)
#> # A tibble: 2 × 4
#>    prob name   from    to
#>   <dbl> <chr> <dbl> <dbl>
#> 1   0.4 pos       1     2
#> 2   0.6 neg       1     3