match_branchlabel_to_prob: Match branch label to probabilities

View source: R/match_branchlabel_to_prob.R

match_branchlabel_to_probR Documentation

Match branch label to probabilities

Description

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

See Also

match_branch_to_label

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)


n8thangreen/CEdecisiontree documentation built on Sept. 13, 2022, 5:25 a.m.